@abaplint/transpiler-cli 2.11.83 → 2.11.85
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 +7 -3
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -89661,10 +89661,14 @@ class UpdateDatabaseTranspiler {
|
|
|
89661
89661
|
}
|
|
89662
89662
|
options.push(`"set": [${s.join(",")}]`);
|
|
89663
89663
|
}
|
|
89664
|
-
const
|
|
89665
|
-
if (
|
|
89664
|
+
const sourceExpression = node.findDirectExpression(abaplint.Expressions.SQLSource)?.findDirectExpression(abaplint.Expressions.SimpleSource3);
|
|
89665
|
+
if (sourceExpression) {
|
|
89666
|
+
const sqlSource = new expressions_1.SourceTranspiler(true).transpile(sourceExpression, traversal).getCode();
|
|
89666
89667
|
const tableName = node.findDirectExpression(abaplint.Expressions.DatabaseTable)?.concatTokens();
|
|
89667
89668
|
const tabl = traversal.findTable(tableName);
|
|
89669
|
+
if (tabl === undefined) {
|
|
89670
|
+
return new chunk_1.Chunk(`throw new Error("UpdateDatabaseTranspiler: table ${tableName} not found");`);
|
|
89671
|
+
}
|
|
89668
89672
|
const keys = tabl.listKeys(traversal.reg).map(k => k.toLowerCase());
|
|
89669
89673
|
const allFields = tabl.parseType(traversal.reg).getComponents().map(c => {
|
|
89670
89674
|
return c.name.toLowerCase();
|
|
@@ -89672,7 +89676,7 @@ class UpdateDatabaseTranspiler {
|
|
|
89672
89676
|
const where = [];
|
|
89673
89677
|
const set = [];
|
|
89674
89678
|
for (const fieldName of allFields) {
|
|
89675
|
-
const cond = `\\"${fieldName}\\" = '\" + ${sqlSource}
|
|
89679
|
+
const cond = `\\"${fieldName}\\" = '\" + ${sqlSource}.${fieldName}.get() + \"'`;
|
|
89676
89680
|
if (keys.includes(fieldName) === true) {
|
|
89677
89681
|
where.push(cond);
|
|
89678
89682
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.85",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@abaplint/core": "^2.113.200",
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
31
|
+
"@abaplint/transpiler": "^2.11.85",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|