@abaplint/transpiler 2.7.84 → 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 abap.statements.loop(${faeTranspiled})) {
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") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.84",
3
+ "version": "2.7.86",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "author": "abaplint",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@abaplint/core": "^2.102.32",
32
+ "@abaplint/core": "^2.102.33",
33
33
  "source-map": "^0.7.4"
34
34
  },
35
35
  "devDependencies": {