@abaplint/runtime 2.4.5 → 2.4.6

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.
@@ -36,11 +36,16 @@ class SelectDatabase {
36
36
  else if (target instanceof types_1.Table) {
37
37
  for (const row of rows) {
38
38
  const targetRow = (0, clone_1.clone)(target.getRowType());
39
- for (let columnName in row) {
40
- columnName = columnName.toLowerCase();
41
- // todo, non structured table = table with simple rows
42
- // @ts-ignore
43
- (_a = targetRow.get()[columnName]) === null || _a === void 0 ? void 0 : _a.set(row[columnName]);
39
+ if (targetRow instanceof types_1.Structure) {
40
+ for (let columnName in row) {
41
+ columnName = columnName.toLowerCase();
42
+ // @ts-ignore
43
+ (_a = targetRow.get()[columnName]) === null || _a === void 0 ? void 0 : _a.set(row[columnName]);
44
+ }
45
+ }
46
+ else {
47
+ const columnName = Object.keys(row)[0];
48
+ targetRow.set(row[columnName]);
44
49
  }
45
50
  // @ts-ignore
46
51
  abap.statements.insertInternal({ table: target, data: targetRow });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",