@abaplint/transpiler-cli 2.3.118 → 2.3.119

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 +8 -1
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -66479,7 +66479,11 @@ class SQLiteDatabaseSchema {
66479
66479
  // https://www.sqlite.org/lang_createview.html
66480
66480
  buildVIEW(view) {
66481
66481
  const fields = view.getFields();
66482
- const columns = fields === null || fields === void 0 ? void 0 : fields.map((f) => "'" + f.TABNAME.toLowerCase() + "'." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase()).join(", ");
66482
+ let firstTabname = "";
66483
+ const columns = fields === null || fields === void 0 ? void 0 : fields.map((f) => {
66484
+ firstTabname = "'" + f.TABNAME.toLowerCase() + "'";
66485
+ return firstTabname + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase();
66486
+ }).join(", ");
66483
66487
  let from = "";
66484
66488
  let previous = "";
66485
66489
  for (const j of view.getJoin() || []) {
@@ -66495,6 +66499,9 @@ class SQLiteDatabaseSchema {
66495
66499
  previous = j.LTAB + "," + j.RTAB;
66496
66500
  }
66497
66501
  from = from.trim();
66502
+ if (from === "") {
66503
+ from = firstTabname;
66504
+ }
66498
66505
  return `CREATE VIEW '${view.getName().toLowerCase()}' AS SELECT ${columns} FROM ${from};\n`;
66499
66506
  }
66500
66507
  buildTABL(tabl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.3.118",
3
+ "version": "2.3.119",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,7 +25,7 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.3.118",
28
+ "@abaplint/transpiler": "^2.3.119",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",