@abaplint/runtime 2.11.81 → 2.11.83
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,7 +36,9 @@ async function updateDatabase(table, options, context) {
|
|
|
36
36
|
set.push(...options.set);
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
|
-
|
|
39
|
+
console.dir(table);
|
|
40
|
+
console.dir(options);
|
|
41
|
+
throw new Error("updateDatabase, todo");
|
|
40
42
|
}
|
|
41
43
|
const { subrc, dbcnt } = await context.defaultDB().update({
|
|
42
44
|
table: (0, prefix_1.buildDbTableName)(table),
|
package/build/src/types/table.js
CHANGED
|
@@ -12,6 +12,7 @@ const sort_1 = require("../statements/sort");
|
|
|
12
12
|
const character_1 = require("./character");
|
|
13
13
|
const hex_1 = require("./hex");
|
|
14
14
|
const hex_uint8_1 = require("./hex_uint8");
|
|
15
|
+
const move_corresponding_1 = require("../statements/move_corresponding");
|
|
15
16
|
var TableAccessType;
|
|
16
17
|
(function (TableAccessType) {
|
|
17
18
|
TableAccessType["standard"] = "STANDARD";
|
|
@@ -497,7 +498,7 @@ class Table {
|
|
|
497
498
|
return ref;
|
|
498
499
|
}
|
|
499
500
|
else {
|
|
500
|
-
const val = this.cloneRow(item);
|
|
501
|
+
const val = this.cloneRow(item, true);
|
|
501
502
|
this.value.push(val);
|
|
502
503
|
return val;
|
|
503
504
|
}
|
|
@@ -518,7 +519,7 @@ class Table {
|
|
|
518
519
|
this.value.sort(compareFn);
|
|
519
520
|
}
|
|
520
521
|
///////////////////////////
|
|
521
|
-
cloneRow(item) {
|
|
522
|
+
cloneRow(item, corresponding = false) {
|
|
522
523
|
// make sure to do conversion if needed
|
|
523
524
|
if (typeof item === "number") {
|
|
524
525
|
const tmp = this.getRowType().clone();
|
|
@@ -536,6 +537,11 @@ class Table {
|
|
|
536
537
|
const val = item.clone();
|
|
537
538
|
return val;
|
|
538
539
|
}
|
|
540
|
+
else if (corresponding === true && this.isStructured === true && item instanceof structure_1.Structure) {
|
|
541
|
+
const tmp = this.getRowType().clone();
|
|
542
|
+
(0, move_corresponding_1.moveCorresponding)(item, tmp);
|
|
543
|
+
return tmp;
|
|
544
|
+
}
|
|
539
545
|
else {
|
|
540
546
|
const tmp = this.getRowType().clone();
|
|
541
547
|
tmp.set(item);
|