@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.
Files changed (2) hide show
  1. package/build/bundle.js +7 -3
  2. 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 sqlSource = node.findDirectExpression(abaplint.Expressions.SQLSource)?.concatTokens()?.toLowerCase().replace("@", "");
89665
- if (sqlSource) {
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}.get().${fieldName}.get() + \"'`;
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.83",
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.83",
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",