@abaplint/runtime 2.13.42 → 2.13.44
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.
|
@@ -32,11 +32,13 @@ async function deleteInternal(target, options) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
if (options?.to) {
|
|
35
|
-
if (options?.
|
|
35
|
+
if (options?.where !== undefined) {
|
|
36
36
|
throw new Error("DeleteInternalTodo");
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const from = options.from?.get() ?? 1;
|
|
39
|
+
const to = Math.min(options.to.get(), target.array().length);
|
|
40
|
+
for (let i = to; i >= from; i--) {
|
|
41
|
+
target.deleteIndex(i - 1);
|
|
40
42
|
}
|
|
41
43
|
return;
|
|
42
44
|
}
|
|
@@ -75,6 +77,7 @@ async function deleteInternal(target, options) {
|
|
|
75
77
|
target.deleteIndex(target.getCurrentLoopIndex());
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
80
|
+
let deleted = 0;
|
|
78
81
|
for await (const i of (0, loop_1.loop)(target)) {
|
|
79
82
|
index = abap.builtin.sy.get().tabix.get() - 1;
|
|
80
83
|
if (options?.where) {
|
|
@@ -86,6 +89,7 @@ async function deleteInternal(target, options) {
|
|
|
86
89
|
else {
|
|
87
90
|
target.deleteIndex(index);
|
|
88
91
|
}
|
|
92
|
+
deleted++;
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
else if (options?.index && options.index.get() === index) {
|
|
@@ -99,5 +103,8 @@ async function deleteInternal(target, options) {
|
|
|
99
103
|
target.deleteIndex(index);
|
|
100
104
|
}
|
|
101
105
|
}
|
|
106
|
+
if (options?.where) {
|
|
107
|
+
abap.builtin.sy.get().subrc.set(deleted > 0 ? 0 : 4);
|
|
108
|
+
}
|
|
102
109
|
}
|
|
103
110
|
//# sourceMappingURL=delete_internal.js.map
|