@abaplint/runtime 2.5.22 → 2.5.24

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.
@@ -8,11 +8,11 @@ class SelectDatabase {
8
8
  this.context = context;
9
9
  }
10
10
  async select(target, input, runtimeOptions) {
11
- var _a;
11
+ var _a, _b;
12
12
  const { rows: rows } = await this.context.defaultDB().select(input);
13
13
  if (target instanceof types_1.FieldSymbol) {
14
14
  if (target.isAssigned() === false) {
15
- throw "select, fs not assigned";
15
+ throw new Error("GETWA_NOT_ASSIGNED");
16
16
  }
17
17
  // @ts-ignore
18
18
  target = target.getPointer();
@@ -28,6 +28,9 @@ class SelectDatabase {
28
28
  if (target instanceof types_1.Structure) {
29
29
  const result = {};
30
30
  for (const column in rows[0]) {
31
+ if (rows[0][column] === null) {
32
+ continue;
33
+ }
31
34
  result[column] = (0, clone_1.clone)(target.get()[column]).set(rows[0][column]);
32
35
  }
33
36
  // @ts-ignore
@@ -39,8 +42,12 @@ class SelectDatabase {
39
42
  if (targetRow instanceof types_1.Structure) {
40
43
  for (let columnName in row) {
41
44
  columnName = columnName.toLowerCase();
45
+ if (row[columnName] === null) {
46
+ (_a = targetRow.get()[columnName]) === null || _a === void 0 ? void 0 : _a.clear();
47
+ continue;
48
+ }
42
49
  // @ts-ignore
43
- (_a = targetRow.get()[columnName]) === null || _a === void 0 ? void 0 : _a.set(row[columnName]);
50
+ (_b = targetRow.get()[columnName]) === null || _b === void 0 ? void 0 : _b.set(row[columnName]);
44
51
  }
45
52
  }
46
53
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.5.22",
3
+ "version": "2.5.24",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",