All files / output cl_sql_result_set.clas.mjs

76.66% Statements 69/90
72.72% Branches 8/11
31.81% Functions 7/22
76.66% Lines 69/90

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 901x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x 1x 1x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x                 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x   6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x                 6x         6x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_sql_result_set.clas.abap
class cl_sql_result_set {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_SQL_RESULT_SET';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MV_MAGIC": {"type": () => {return new abap.types.Hex();}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "MV_INDEX": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "MV_REF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "visibility": "I", "is_constant": " ", "is_class": " "}};
  static METHODS = {"SET_PARAM": {"visibility": "U", "parameters": {"DATA_REF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " ", "parm_kind": "I", "type_name": "DataReference"}}},
  "SET_PARAM_TABLE": {"visibility": "U", "parameters": {"ITAB_REF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " ", "parm_kind": "I", "type_name": "DataReference"}, "CORRESPONDING_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}, "LOB_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}}},
  "NEXT": {"visibility": "U", "parameters": {"ROWS_RET": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "R", "type_name": "IntegerType"}}},
  "CLOSE": {"visibility": "U", "parameters": {}},
  "SET_PARAM_STRUCT": {"visibility": "U", "parameters": {"STRUCT_REF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " ", "parm_kind": "I", "type_name": "DataReference"}, "CORRESPONDING_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}, "LOB_FIELDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}}},
  "NEXT_PACKAGE": {"visibility": "U", "parameters": {"ROWS_RET": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "R", "type_name": "IntegerType"}}}};
  #mv_ref;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "set_param": this.set_param.bind(this),
      "set_param_table": this.set_param_table.bind(this),
      "next": this.next.bind(this),
      "close": this.close.bind(this),
      "set_param_struct": this.set_param_struct.bind(this),
      "next_package": this.next_package.bind(this),
    };
    this.mv_magic = new abap.types.Hex();
    this.mv_index = new abap.types.Integer({qualifiedName: "I"});
    this.#mv_ref = new abap.types.DataReference(new abap.types.Character(4));
    this.FRIENDS_ACCESS_INSTANCE["mv_ref"] = this.#mv_ref;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async set_param_struct(INPUT) {
    let struct_ref = INPUT?.struct_ref;
    if (struct_ref === undefined) { struct_ref = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.struct_ref); }
    let corresponding_fields = abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");
    if (INPUT && INPUT.corresponding_fields) {corresponding_fields.set(INPUT.corresponding_fields);}
    let lob_fields = abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");
    if (INPUT && INPUT.lob_fields) {lob_fields.set(INPUT.lob_fields);}
    return;
  }
  async set_param(INPUT) {
    let data_ref = INPUT?.data_ref;
    if (data_ref === undefined) { data_ref = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.data_ref); }
    this.#mv_ref.set(data_ref);
  }
  async next() {
    let rows_ret = new abap.types.Integer({qualifiedName: "I"});
    let lv_total = new abap.types.Integer({qualifiedName: "I"});
    let lv_value = new abap.types.String({qualifiedName: "STRING"});
    lv_total.set(this.mv_magic.length);
    const current = this.mv_magic[this.mv_index.get()];
    if (typeof Object.values(current)[0] === "boolean") {
        lv_value.set(Object.values(current)[0] ? "X" : "");
    } else {
        lv_value.set(Object.values(current)[0]);
    }
    if (abap.compare.initial(this.#mv_ref) === false) {
      this.#mv_ref.dereference().set(lv_value);
    }
    rows_ret.set(abap.operators.minus(lv_total,this.mv_index));
    this.mv_index.set(abap.operators.add(this.mv_index,abap.IntegerFactory.get(1)));
    return rows_ret;
  }
  async close() {
    return;
  }
  async set_param_table(INPUT) {
    let itab_ref = INPUT?.itab_ref;
    if (itab_ref === undefined) { itab_ref = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.itab_ref); }
    let corresponding_fields = abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");
    if (INPUT && INPUT.corresponding_fields) {corresponding_fields.set(INPUT.corresponding_fields);}
    let lob_fields = abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"adbc_name","ddicName":"CHAR30","description":""}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "adbc_column_tab");
    if (INPUT && INPUT.lob_fields) {lob_fields.set(INPUT.lob_fields);}
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async next_package() {
    let rows_ret = new abap.types.Integer({qualifiedName: "I"});
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
    return rows_ret;
  }
}
abap.Classes['CL_SQL_RESULT_SET'] = cl_sql_result_set;
export {cl_sql_result_set};