@abaplint/runtime 2.1.11 → 2.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ class SelectDatabase {
17
17
  // @ts-ignore
18
18
  target = target.getPointer();
19
19
  }
20
- target.clear();
20
+ target === null || target === void 0 ? void 0 : target.clear();
21
21
  if (rows.length === 0) {
22
22
  // @ts-ignore
23
23
  abap.builtin.sy.get().subrc.set(4);
@@ -42,11 +42,17 @@ class SelectDatabase {
42
42
  // @ts-ignore
43
43
  abap.statements.insertInternal({ table: target, data: targetRow });
44
44
  }
45
+ }
46
+ else if (target !== undefined) {
47
+ throw new Error("Runtime, SELECT todo");
48
+ }
49
+ if (target === undefined && rows.length === 1) {
45
50
  // @ts-ignore
46
- abap.builtin.sy.get().dbcnt.set(rows.length);
51
+ abap.builtin.sy.get().dbcnt.set(Object.values(rows[0])[0]);
47
52
  }
48
53
  else {
49
- throw new Error("Runtime, SELECT todo");
54
+ // @ts-ignore
55
+ abap.builtin.sy.get().dbcnt.set(rows.length);
50
56
  }
51
57
  // @ts-ignore
52
58
  abap.builtin.sy.get().subrc.set(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.1.11",
3
+ "version": "2.1.12",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",