-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
CLASS cl_sql_result_set DEFINITION PUBLIC. | ||
PUBLIC SECTION. | ||
METHODS set_param | ||
IMPORTING | ||
data_ref TYPE REF TO data | ||
RAISING | ||
cx_parameter_invalid. | ||
|
||
METHODS next | ||
RETURNING | ||
VALUE(rows_ret) TYPE i | ||
RAISING | ||
cx_sql_exception. | ||
|
||
METHODS close. | ||
PRIVATE SECTION. | ||
DATA mv_magic TYPE x LENGTH 1. | ||
DATA mv_index TYPE i. | ||
DATA mv_ref TYPE REF TO data. | ||
ENDCLASS. | ||
|
||
CLASS cl_sql_result_set IMPLEMENTATION. | ||
|
||
METHOD set_param. | ||
mv_ref = data_ref. | ||
ENDMETHOD. | ||
|
||
METHOD next. | ||
* todo, more work needed here | ||
|
||
DATA lv_total TYPE i. | ||
DATA lv_value TYPE string. | ||
|
||
WRITE '@KERNEL lv_total.set(this.mv_magic.length);'. | ||
* WRITE '@KERNEL console.dir(this.mv_magic);'. | ||
WRITE '@KERNEL const current = this.mv_magic[this.mv_index.get()];'. | ||
WRITE '@KERNEL lv_value.set(Object.values(current)[0]);'. | ||
|
||
mv_ref->* = lv_value. | ||
|
||
mv_index = mv_index + 1. | ||
rows_ret = lv_total - mv_index. | ||
ENDMETHOD. | ||
|
||
METHOD close. | ||
* nothing here, | ||
RETURN. | ||
ENDMETHOD. | ||
|
||
ENDCLASS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters