@abaplint/runtime 2.10.62 → 2.10.64
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.
|
@@ -2,12 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.collect = collect;
|
|
4
4
|
const compare_1 = require("../compare");
|
|
5
|
+
const types_1 = require("../types");
|
|
5
6
|
const insert_internal_1 = require("./insert_internal");
|
|
6
7
|
const read_table_1 = require("./read_table");
|
|
7
8
|
function collect(source, target) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(0,
|
|
9
|
+
if (target === undefined && source instanceof types_1.Table) {
|
|
10
|
+
// with header line
|
|
11
|
+
const read = (0, read_table_1.readTable)(source, { withKey: (i) => { return (0, compare_1.eq)(i.table_line, source.getHeader()); } });
|
|
12
|
+
if (read.subrc === 4) {
|
|
13
|
+
(0, insert_internal_1.insertInternal)({ table: source, data: source.getHeader() });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else if (target !== undefined) {
|
|
17
|
+
const read = (0, read_table_1.readTable)(target, { withKey: (i) => { return (0, compare_1.eq)(i.table_line, source); } });
|
|
18
|
+
if (read.subrc === 4) {
|
|
19
|
+
(0, insert_internal_1.insertInternal)({ table: target, data: source });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
throw "COLLECT, no target specified";
|
|
11
24
|
}
|
|
12
25
|
}
|
|
13
26
|
//# sourceMappingURL=collect.js.map
|