@abaplint/transpiler 2.3.91 → 2.3.92
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/sqlite_database_schema.js +4 -4
- package/build/src/statements/index.d.ts +1 -0
- package/build/src/statements/index.js +1 -0
- package/build/src/statements/initialization.d.ts +7 -0
- package/build/src/statements/initialization.js +11 -0
- package/build/src/validation.js +1 -0
- package/package.json +1 -1
|
@@ -28,18 +28,18 @@ class SQLiteDatabaseSchema {
|
|
|
28
28
|
// https://www.sqlite.org/lang_createview.html
|
|
29
29
|
buildVIEW(view) {
|
|
30
30
|
const fields = view.getFields();
|
|
31
|
-
const columns = fields === null || fields === void 0 ? void 0 : fields.map((f) => f.TABNAME.toLowerCase() + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase()).join(", ");
|
|
31
|
+
const columns = fields === null || fields === void 0 ? void 0 : fields.map((f) => "'" + f.TABNAME.toLowerCase() + "'." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase()).join(", ");
|
|
32
32
|
let from = "";
|
|
33
33
|
let previous = "";
|
|
34
34
|
for (const j of view.getJoin() || []) {
|
|
35
35
|
if (previous === "") {
|
|
36
|
-
from += j.LTAB.toLowerCase() + " INNER JOIN " + j.RTAB.toLowerCase() + " ON " + j.LTAB.toLowerCase() + "." + j.LFIELD.toLowerCase() + " = " + j.RTAB.toLowerCase() + "." + j.RFIELD.toLowerCase();
|
|
36
|
+
from += "'" + j.LTAB.toLowerCase() + "' INNER JOIN '" + j.RTAB.toLowerCase() + "' ON '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
37
37
|
}
|
|
38
38
|
else if (previous === j.LTAB + "," + j.RTAB) {
|
|
39
|
-
from += " AND " + j.LTAB.toLowerCase() + "." + j.LFIELD.toLowerCase() + " = " + j.RTAB.toLowerCase() + "." + j.RFIELD.toLowerCase();
|
|
39
|
+
from += " AND '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
from += " INNER JOIN " + j.RTAB.toLowerCase() + " ON " + j.LTAB.toLowerCase() + "." + j.LFIELD.toLowerCase() + " = " + j.RTAB.toLowerCase() + "." + j.RFIELD.toLowerCase();
|
|
42
|
+
from += " INNER JOIN '" + j.RTAB.toLowerCase() + "' ON '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
43
43
|
}
|
|
44
44
|
previous = j.LTAB + "," + j.RTAB;
|
|
45
45
|
}
|
|
@@ -19,6 +19,7 @@ export * from "./class_definition_load";
|
|
|
19
19
|
export * from "./class_implementation";
|
|
20
20
|
export * from "./class_local_friends";
|
|
21
21
|
export * from "./clear";
|
|
22
|
+
export * from "./initialization";
|
|
22
23
|
export * from "./close_dataset";
|
|
23
24
|
export * from "./collect";
|
|
24
25
|
export * from "./commit";
|
|
@@ -35,6 +35,7 @@ __exportStar(require("./class_definition_load"), exports);
|
|
|
35
35
|
__exportStar(require("./class_implementation"), exports);
|
|
36
36
|
__exportStar(require("./class_local_friends"), exports);
|
|
37
37
|
__exportStar(require("./clear"), exports);
|
|
38
|
+
__exportStar(require("./initialization"), exports);
|
|
38
39
|
__exportStar(require("./close_dataset"), exports);
|
|
39
40
|
__exportStar(require("./collect"), exports);
|
|
40
41
|
__exportStar(require("./commit"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class InitializationTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(_node: abaplint.Nodes.StatementNode, _traversal: Traversal): Chunk;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InitializationTranspiler = void 0;
|
|
4
|
+
const chunk_1 = require("../chunk");
|
|
5
|
+
class InitializationTranspiler {
|
|
6
|
+
transpile(_node, _traversal) {
|
|
7
|
+
return new chunk_1.Chunk(`throw new Error("Initialization, transpiler todo");`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.InitializationTranspiler = InitializationTranspiler;
|
|
11
|
+
//# sourceMappingURL=initialization.js.map
|
package/build/src/validation.js
CHANGED