@abaplint/transpiler 2.7.85 → 2.7.86
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.
|
@@ -92,6 +92,7 @@ class SelectTranspiler {
|
|
|
92
92
|
}
|
|
93
93
|
if (node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) {
|
|
94
94
|
const unique = unique_identifier_1.UniqueIdentifier.get();
|
|
95
|
+
const unique2 = unique_identifier_1.UniqueIdentifier.get();
|
|
95
96
|
const fn = (_a = node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(abaplint.Expressions.SQLSource);
|
|
96
97
|
const faeTranspiled = new expressions_1.SQLSourceTranspiler().transpile(fn, traversal).getCode();
|
|
97
98
|
select = select.replace(new RegExp(" " + escapeRegExp(faeTranspiled), "g"), " " + unique);
|
|
@@ -103,8 +104,9 @@ class SelectTranspiler {
|
|
|
103
104
|
const code = `if (${faeTranspiled}.array().length === 0) {
|
|
104
105
|
throw "FAE, todo, empty table";
|
|
105
106
|
} else {
|
|
107
|
+
const ${unique2} = ${faeTranspiled}.array();
|
|
106
108
|
abap.statements.clear(${target});
|
|
107
|
-
for await (const ${unique} of
|
|
109
|
+
for await (const ${unique} of ${unique2}) {
|
|
108
110
|
await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
|
|
109
111
|
}
|
|
110
112
|
if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
|