@abaplint/transpiler-cli 2.7.60 → 2.7.62
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.
- package/build/bundle.js +17 -6
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -71716,7 +71716,7 @@ class SQLCondTranspiler {
|
|
|
71716
71716
|
}
|
|
71717
71717
|
}
|
|
71718
71718
|
else if (c.findDirectExpression(abaplint.Expressions.SQLIn)) {
|
|
71719
|
-
ret += this.sqlIn(c, traversal);
|
|
71719
|
+
ret += this.sqlIn(c, traversal, traversal.getFilename(), table);
|
|
71720
71720
|
}
|
|
71721
71721
|
else {
|
|
71722
71722
|
ret += this.basicCondition(c, traversal, traversal.getFilename(), table);
|
|
@@ -71732,15 +71732,26 @@ class SQLCondTranspiler {
|
|
|
71732
71732
|
const c = new chunk_1.Chunk();
|
|
71733
71733
|
return c.appendString(ret.trim());
|
|
71734
71734
|
}
|
|
71735
|
-
sqlIn(c,
|
|
71735
|
+
sqlIn(c, traversal, filename, table) {
|
|
71736
71736
|
const fieldName = c.findDirectExpression(abaplint.Expressions.SQLFieldName);
|
|
71737
|
-
const
|
|
71737
|
+
const sqlin = c.findDirectExpression(abaplint.Expressions.SQLIn);
|
|
71738
71738
|
const source = c.findFirstExpression(abaplint.Expressions.SimpleSource3);
|
|
71739
|
-
if (fieldName === undefined ||
|
|
71739
|
+
if (fieldName === undefined || sqlin === undefined || source === undefined) {
|
|
71740
71740
|
throw new Error("SQL Condition, transpiler todo, " + c.concatTokens());
|
|
71741
71741
|
}
|
|
71742
|
-
|
|
71743
|
-
|
|
71742
|
+
if (sqlin.getChildren().length === 2) {
|
|
71743
|
+
return `" + abap.expandIN("${fieldName.concatTokens()}", ${source.concatTokens()}) + "`;
|
|
71744
|
+
}
|
|
71745
|
+
else {
|
|
71746
|
+
const cond = [];
|
|
71747
|
+
for (const s of sqlin.findDirectExpressions(abaplint.Expressions.SQLSource)) {
|
|
71748
|
+
const field = new sql_field_name_1.SQLFieldNameTranspiler().transpile(fieldName, traversal).getCode();
|
|
71749
|
+
const sourc = this.sqlSource(s, traversal, filename, table);
|
|
71750
|
+
cond.push(field + " = " + sourc);
|
|
71751
|
+
}
|
|
71752
|
+
const ret = "( " + cond.join(" OR ") + " )";
|
|
71753
|
+
return ret;
|
|
71754
|
+
}
|
|
71744
71755
|
}
|
|
71745
71756
|
basicCondition(c, traversal, filename, table) {
|
|
71746
71757
|
let ret = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.62",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.62",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|