@abaplint/transpiler 2.2.0 → 2.2.1
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.
|
@@ -14,7 +14,11 @@ class SQLiteDatabaseSchema {
|
|
|
14
14
|
&& obj.getTableCategory() === abaplint.Objects.TableCategory.Transparent) {
|
|
15
15
|
statements.push(this.buildTABL(obj).trim());
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
// CREATE VIEWs after TABLEs
|
|
19
|
+
// todo: what if the view is based on another view?
|
|
20
|
+
for (const obj of this.reg.getObjects()) {
|
|
21
|
+
if (obj instanceof abaplint.Objects.View) {
|
|
18
22
|
statements.push(this.buildVIEW(obj).trim());
|
|
19
23
|
}
|
|
20
24
|
}
|
|
@@ -23,9 +27,8 @@ class SQLiteDatabaseSchema {
|
|
|
23
27
|
//////////////////
|
|
24
28
|
// https://www.sqlite.org/lang_createview.html
|
|
25
29
|
buildVIEW(view) {
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
const columns = fields.map((f) => f.TABNAME.toLowerCase() + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase()).join(", ");
|
|
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(", ");
|
|
29
32
|
let from = "";
|
|
30
33
|
let previous = "";
|
|
31
34
|
for (const j of view.getJoin() || []) {
|
package/build/src/keywords.js
CHANGED
|
@@ -11,9 +11,9 @@ class Keywords {
|
|
|
11
11
|
continue;
|
|
12
12
|
}
|
|
13
13
|
for (const f of o.getABAPFiles()) {
|
|
14
|
-
|
|
14
|
+
const tokens = [];
|
|
15
15
|
for (const s of f.getStatements()) {
|
|
16
|
-
tokens
|
|
16
|
+
tokens.push(...this.traverse(s, f));
|
|
17
17
|
}
|
|
18
18
|
if (tokens.length === 0) {
|
|
19
19
|
continue;
|
|
@@ -51,6 +51,7 @@ class Keywords {
|
|
|
51
51
|
];
|
|
52
52
|
// "with"
|
|
53
53
|
// "delete"
|
|
54
|
+
keywords.push(...keywords.map(k => "!" + k));
|
|
54
55
|
let ret = [];
|
|
55
56
|
for (const c of node.getChildren()) {
|
|
56
57
|
if (c instanceof abaplint.Nodes.TokenNodeRegex) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"author": "abaplint",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@abaplint/core": "^2.93.
|
|
31
|
+
"@abaplint/core": "^2.93.35",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|