@abaplint/transpiler 2.7.88 → 2.7.89
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/src/db/index.js
CHANGED
|
@@ -31,7 +31,7 @@ class DatabaseSetup {
|
|
|
31
31
|
// INSERT data
|
|
32
32
|
for (const obj of this.reg.getObjects()) {
|
|
33
33
|
if (obj instanceof abaplint.Objects.MessageClass) {
|
|
34
|
-
insert.push(this.insertT100(obj));
|
|
34
|
+
insert.push(...this.insertT100(obj));
|
|
35
35
|
}
|
|
36
36
|
else if (obj instanceof abaplint.Objects.Class
|
|
37
37
|
|| obj instanceof abaplint.Objects.Interface) {
|
|
@@ -73,11 +73,11 @@ class DatabaseSetup {
|
|
|
73
73
|
// ignore if T100 is unknown
|
|
74
74
|
const obj = this.reg.getObject("TABL", "T100");
|
|
75
75
|
if (obj === undefined) {
|
|
76
|
-
return
|
|
76
|
+
return [];
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
const ret = [];
|
|
79
79
|
for (const m of msag.getMessages()) {
|
|
80
|
-
ret
|
|
80
|
+
ret.push(`INSERT INTO "t100" ("sprsl", "arbgb", "msgnr", "text") VALUES ('E', '${msag.getName().padEnd(20, " ")}', '${m.getNumber()}', '${this.escape(m.getMessage().padEnd(73, " "))}');`);
|
|
81
81
|
}
|
|
82
82
|
return ret;
|
|
83
83
|
}
|
|
@@ -6,9 +6,14 @@ class SQLFieldNameTranspiler {
|
|
|
6
6
|
transpile(node, _traversal) {
|
|
7
7
|
const chunk = new chunk_1.Chunk();
|
|
8
8
|
let concat = node.concatTokens();
|
|
9
|
+
/*
|
|
9
10
|
if (concat.includes("~") && concat.split("~")[0].includes("/")) {
|
|
10
|
-
|
|
11
|
-
}
|
|
11
|
+
concat = "'" + concat.replace("~", "'~");
|
|
12
|
+
} else {
|
|
13
|
+
*/
|
|
14
|
+
concat = concat.replace(/~/, `\\".\\"`);
|
|
15
|
+
concat = `\\"` + concat + `\\"`;
|
|
16
|
+
// }
|
|
12
17
|
chunk.appendString(concat);
|
|
13
18
|
return chunk;
|
|
14
19
|
}
|