@abaplint/runtime 2.5.64 → 2.5.66
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.
|
@@ -18,7 +18,12 @@ class SelectDatabase {
|
|
|
18
18
|
target = target.getPointer();
|
|
19
19
|
}
|
|
20
20
|
if ((runtimeOptions === null || runtimeOptions === void 0 ? void 0 : runtimeOptions.appending) !== true) {
|
|
21
|
-
|
|
21
|
+
if (Array.isArray(target)) {
|
|
22
|
+
target.forEach(f => f.clear());
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
target === null || target === void 0 ? void 0 : target.clear();
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
28
|
if (rows.length === 0) {
|
|
24
29
|
// @ts-ignore
|
|
@@ -58,6 +63,12 @@ class SelectDatabase {
|
|
|
58
63
|
abap.statements.insertInternal({ table: target, data: targetRow });
|
|
59
64
|
}
|
|
60
65
|
}
|
|
66
|
+
else if (Array.isArray(target)) {
|
|
67
|
+
for (let index = 0; index < target.length; index++) {
|
|
68
|
+
const element = target[index];
|
|
69
|
+
element.set(rows[0][Object.keys(rows[0])[index]]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
61
72
|
else if (target !== undefined) {
|
|
62
73
|
// its a simple type
|
|
63
74
|
target.set(rows[0][Object.keys(rows[0])[0]]);
|
package/build/src/types/table.js
CHANGED
|
@@ -60,7 +60,6 @@ class HashedTable {
|
|
|
60
60
|
this.loops = new Set();
|
|
61
61
|
this.rowType = rowType;
|
|
62
62
|
this.options = options;
|
|
63
|
-
// this.isStructured = rowType instanceof Structure;
|
|
64
63
|
this.options = options;
|
|
65
64
|
if ((options === null || options === void 0 ? void 0 : options.withHeader) === true) {
|
|
66
65
|
this.header = (0, clone_1.clone)(this.rowType);
|
|
@@ -184,6 +183,7 @@ class HashedTable {
|
|
|
184
183
|
}
|
|
185
184
|
clear() {
|
|
186
185
|
this.value = {};
|
|
186
|
+
this.secondaryIndexes = {};
|
|
187
187
|
}
|
|
188
188
|
set(tab) {
|
|
189
189
|
this.clear();
|