@abaplint/transpiler 2.2.7 → 2.2.8

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.
@@ -77,6 +77,7 @@ class DatabaseSetup {
77
77
  // statements are inside a javascript string stemplate
78
78
  ret = ret.replace(/\\/g, "\\\\");
79
79
  ret = ret.replace(/`/g, "\\`");
80
+ ret = ret.replace(/\${/g, "\\${");
80
81
  return ret;
81
82
  }
82
83
  }
@@ -44,7 +44,7 @@ class SQLiteDatabaseSchema {
44
44
  previous = j.LTAB + "," + j.RTAB;
45
45
  }
46
46
  from = from.trim();
47
- return `CREATE VIEW ${view.getName().toLowerCase()} AS SELECT ${columns} FROM ${from};\n`;
47
+ return `CREATE VIEW '${view.getName().toLowerCase()}' AS SELECT ${columns} FROM ${from};\n`;
48
48
  }
49
49
  buildTABL(tabl) {
50
50
  const type = tabl.parseType(this.reg);
@@ -58,7 +58,7 @@ class SQLiteDatabaseSchema {
58
58
  // assumption: all transparent tables have primary keys
59
59
  // add single quotes to field names to allow for keywords as field names
60
60
  const key = ", PRIMARY KEY(" + tabl.listKeys().map(e => "'" + e.toLowerCase() + "'").join(",") + ")";
61
- return `CREATE TABLE ${tabl.getName().toLowerCase()} (${fields.join(", ")}${key});\n`;
61
+ return `CREATE TABLE '${tabl.getName().toLowerCase()}' (${fields.join(", ")}${key});\n`;
62
62
  }
63
63
  toType(type, fieldname, errorInfo) {
64
64
  if (type instanceof abaplint.BasicTypes.CharacterType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",