@abaplint/transpiler 2.1.28 → 2.1.29

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.
@@ -45,7 +45,7 @@ class DatabaseSetup {
45
45
  if (raw === undefined) {
46
46
  return "";
47
47
  }
48
- return `INSERT INTO reposrc ('PROGNAME', 'DATA') VALUES ('${name}', '${this.escape(raw)}');\n`;
48
+ return `INSERT INTO reposrc ('PROGNAME', 'DATA') VALUES ('${name}', '${this.escape(raw)}');`;
49
49
  }
50
50
  insertT000() {
51
51
  const tabl = this.reg.getObject("TABL", "T000");
@@ -55,7 +55,7 @@ class DatabaseSetup {
55
55
  const type = tabl.parseType(this.reg);
56
56
  if (type instanceof abaplint.BasicTypes.StructureType && type.getComponents().length >= 3) {
57
57
  // todo, this should take the client number from the settings
58
- return `INSERT INTO t000 ('MANDT', 'CCCATEGORY', 'CCNOCLIIND') VALUES ('123', '', '');\n`;
58
+ return `INSERT INTO t000 ('MANDT', 'CCCATEGORY', 'CCNOCLIIND') VALUES ('123', '', '');`;
59
59
  }
60
60
  else {
61
61
  return "";
@@ -68,7 +68,7 @@ class DatabaseSetup {
68
68
  }
69
69
  let ret = "";
70
70
  for (const m of msag.getMessages()) {
71
- ret += `INSERT INTO t100 ('SPRSL', 'ARBGB', 'MSGNR', 'TEXT') VALUES ('E', '${msag.getName()}', '${m.getNumber()}', '${this.escape(m.getMessage())}');\n`;
71
+ ret += `INSERT INTO t100 ('SPRSL', 'ARBGB', 'MSGNR', 'TEXT') VALUES ('E', '${msag.getName()}', '${m.getNumber()}', '${this.escape(m.getMessage())}');`;
72
72
  }
73
73
  return ret;
74
74
  }
@@ -19,7 +19,10 @@ globalThis.abap = new runtime.ABAP();\n`;
19
19
  ret += `${this.buildImports(reg, useImport)}
20
20
 
21
21
  export async function initializeABAP() {\n`;
22
- ret += ` const sqlite = \`${dbSetup.schemas.sqlite}\`;\n`;
22
+ ret += ` const sqlite = [];\n`;
23
+ for (const i of dbSetup.schemas.sqlite) {
24
+ ret += `sqlite.push(\`${i}\`);\n`;
25
+ }
23
26
  ret += ` const hdb = \`${dbSetup.schemas.hdb}\`;\n`;
24
27
  ret += ` const pg = \`${dbSetup.schemas.pg}\`;\n`;
25
28
  ret += ` const schemas = {sqlite, hdb, pg};\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.1.28",
3
+ "version": "2.1.29",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",