@abaplint/core 2.119.32 → 2.119.33
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/abap/2_statements/expressions/_dynamic_access.js +19 -0
- package/build/src/abap/2_statements/expressions/_select_core.js +26 -10
- package/build/src/abap/2_statements/expressions/field_chain.js +2 -1
- package/build/src/abap/2_statements/expressions/select.js +3 -3
- package/build/src/abap/2_statements/expressions/source.js +3 -1
- package/build/src/abap/2_statements/expressions/sql_in.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_set_op.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_set_op_group.js +1 -1
- package/build/src/abap/2_statements/expressions/target.js +2 -1
- package/build/src/abap/5_syntax/expressions/sql_in.js +6 -0
- package/build/src/abap/5_syntax/expressions/sql_set_op_group.js +53 -0
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dynComp = dynComp;
|
|
4
|
+
exports.dynAttr = dynAttr;
|
|
5
|
+
const combi_1 = require("../combi");
|
|
6
|
+
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
|
+
const constant_1 = require("./constant");
|
|
8
|
+
const field_chain_1 = require("./field_chain");
|
|
9
|
+
const version_1 = require("../../../version");
|
|
10
|
+
const dynIdent = (0, combi_1.tok)(tokens_1.ParenLeft);
|
|
11
|
+
const dynClose = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
12
|
+
const dynInside = (0, combi_1.altPrio)(new field_chain_1.FieldChain(), constant_1.Constant);
|
|
13
|
+
function dynComp(...inside) {
|
|
14
|
+
return (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), dynIdent, dynInside, ...inside, dynClose));
|
|
15
|
+
}
|
|
16
|
+
function dynAttr() {
|
|
17
|
+
return (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), dynIdent, dynInside, dynClose));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=_dynamic_access.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSelectSingleCore = buildSelectSingleCore;
|
|
3
4
|
exports.buildSelectCore = buildSelectCore;
|
|
4
5
|
const combi_1 = require("../combi");
|
|
5
6
|
const _1 = require(".");
|
|
@@ -7,7 +8,26 @@ const version_1 = require("../../../version");
|
|
|
7
8
|
const sql_group_by_1 = require("./sql_group_by");
|
|
8
9
|
const sql_into_structure_1 = require("./sql_into_structure");
|
|
9
10
|
const sql_up_to_1 = require("./sql_up_to");
|
|
10
|
-
function
|
|
11
|
+
function buildSelectSingleCore(allowInto = false) {
|
|
12
|
+
const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
|
|
13
|
+
const sqlFields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields, version_1.Version.OpenABAP);
|
|
14
|
+
const privileged = (0, combi_1.ver)(version_1.Version.v758, _1.SQLPrivilegedAccess);
|
|
15
|
+
const fieldList = (0, combi_1.optPrio)(_1.SQLFieldList);
|
|
16
|
+
const client = (0, combi_1.optPrio)(_1.SQLClient);
|
|
17
|
+
const byp = (0, combi_1.optPrio)(_1.SQLBypassingBuffer);
|
|
18
|
+
const whereClause = (0, combi_1.optPrio)(where);
|
|
19
|
+
const groupHaving = (0, combi_1.seq)((0, combi_1.optPrio)(sql_group_by_1.SQLGroupBy), (0, combi_1.optPrio)(_1.SQLHaving));
|
|
20
|
+
const trailingOpts = (0, combi_1.seq)((0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(_1.SQLHints), (0, combi_1.optPrio)(privileged), (0, combi_1.optPrio)(_1.SQLOptions));
|
|
21
|
+
const intoSingle = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
22
|
+
if (!allowInto) {
|
|
23
|
+
const singleBody = (0, combi_1.seq)(_1.SQLFrom, client, byp, whereClause, groupHaving, trailingOpts);
|
|
24
|
+
return (0, combi_1.seq)(fieldList, singleBody);
|
|
25
|
+
}
|
|
26
|
+
const singleAfterFrom = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle), (0, combi_1.optPrio)(_1.DatabaseConnection)), (0, combi_1.seq)(intoSingle, byp, whereClause, groupHaving, trailingOpts), (0, combi_1.seq)(whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle), (0, combi_1.optPrio)(_1.DatabaseConnection))));
|
|
27
|
+
const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), whereClause, groupHaving, trailingOpts);
|
|
28
|
+
return (0, combi_1.seq)(fieldList, byp, (0, combi_1.altPrio)(singleIntoBeforeFrom, singleAfterFrom));
|
|
29
|
+
}
|
|
30
|
+
function buildSelectCore(allowInto = false, allowOrderBy = true) {
|
|
11
31
|
const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
|
|
12
32
|
const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("OFFSET", _1.SQLSource));
|
|
13
33
|
const sqlFields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields, version_1.Version.OpenABAP);
|
|
@@ -23,21 +43,17 @@ function buildSelectCore(into, allowOrderBy = true) {
|
|
|
23
43
|
: [];
|
|
24
44
|
const trailingOpts = (0, combi_1.seq)((0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(_1.SQLHints), (0, combi_1.optPrio)(privileged), (0, combi_1.optPrio)(_1.SQLOptions));
|
|
25
45
|
const intoSingle = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
26
|
-
const intoAny = into ? (0, combi_1.altPrio)(into, intoSingle) : intoSingle;
|
|
27
46
|
const intoForPackSize = _1.SQLIntoTable;
|
|
28
|
-
if (!
|
|
47
|
+
if (!allowInto) {
|
|
29
48
|
const afterFromNoInto = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, fae, whereClause, groupHaving, ...orderUpOff, trailingOpts), (0, combi_1.seq)(fae, whereClause, groupHaving, ...orderUpOff, trailingOpts)));
|
|
30
|
-
|
|
31
|
-
return (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, singleBody), (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, byp, afterFromNoInto)));
|
|
49
|
+
return (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", buildSelectSingleCore(false)), (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, byp, afterFromNoInto));
|
|
32
50
|
}
|
|
33
51
|
const fromPackSize = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLPackageSize), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo));
|
|
34
52
|
const trailingInto = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), (0, combi_1.optPrio)(_1.SQLOrderBy), (0, combi_1.optPrio)(_1.SQLOptions))), (0, combi_1.optPrio)((0, combi_1.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), (0, combi_1.optPrio)(_1.SQLOptions))));
|
|
35
|
-
const afterFromWithInto = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLFrom), client, byp, fromPackSize, (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto), (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts
|
|
53
|
+
const afterFromWithInto = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLFrom), client, byp, fromPackSize, (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto), (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts), (0, combi_1.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, fae, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), whereClause, groupHaving, ...orderUpOff, trailingOpts), (0, combi_1.seq)(fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto)));
|
|
36
54
|
const selectTableIntoThenFrom = (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
|
|
37
|
-
const selectOtherIntoThenFrom = (0, combi_1.seq)(
|
|
55
|
+
const selectOtherIntoThenFrom = (0, combi_1.seq)(intoSingle, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
|
|
38
56
|
const nonSingleBody = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.altPrio)(selectTableIntoThenFrom, selectOtherIntoThenFrom, afterFromWithInto));
|
|
39
|
-
|
|
40
|
-
const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), whereClause, groupHaving, trailingOpts);
|
|
41
|
-
return (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, byp, (0, combi_1.altPrio)(singleIntoBeforeFrom, singleAfterFrom)), nonSingleBody));
|
|
57
|
+
return (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", buildSelectSingleCore(true)), nonSingleBody);
|
|
42
58
|
}
|
|
43
59
|
//# sourceMappingURL=_select_core.js.map
|
|
@@ -4,11 +4,12 @@ exports.FieldChain = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
const _1 = require(".");
|
|
6
6
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
|
+
const _dynamic_access_1 = require("./_dynamic_access");
|
|
7
8
|
class FieldChain extends combi_1.Expression {
|
|
8
9
|
getRunnable() {
|
|
9
10
|
const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), _1.AttributeName);
|
|
10
11
|
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(_1.ComponentName));
|
|
11
|
-
const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, attr, comp, _1.TableExpression));
|
|
12
|
+
const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)), comp, _1.TableExpression));
|
|
12
13
|
const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), _1.AttributeName);
|
|
13
14
|
const start = (0, combi_1.altPrio)(clas, _1.SourceField, _1.SourceFieldSymbol);
|
|
14
15
|
const after = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.DashW), (0, combi_1.seq)((0, combi_1.optPrio)(_1.TableBody), (0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)));
|
|
@@ -9,10 +9,10 @@ const _select_core_1 = require("./_select_core");
|
|
|
9
9
|
class Select extends combi_1.Expression {
|
|
10
10
|
getRunnable() {
|
|
11
11
|
const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
12
|
-
const standalone = (0, _select_core_1.buildSelectCore)(
|
|
12
|
+
const standalone = (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), (0, _select_core_1.buildSelectSingleCore)(true)), (0, _select_core_1.buildSelectCore)(true));
|
|
13
13
|
const unionTail = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)(_1.SQLSetOp), version_1.Version.OpenABAP);
|
|
14
|
-
const chained = (0, combi_1.seq)((0, _select_core_1.buildSelectCore)(
|
|
15
|
-
return (0, combi_1.altPrio)(chained, standalone);
|
|
14
|
+
const chained = (0, combi_1.seq)((0, _select_core_1.buildSelectCore)(false, false), unionTail, (0, combi_1.optPrio)(_1.SQLOrderBy), (0, combi_1.optPrio)(into));
|
|
15
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(chained, standalone));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.Select = Select;
|
|
@@ -8,6 +8,7 @@ const version_1 = require("../../../version");
|
|
|
8
8
|
const text_element_1 = require("./text_element");
|
|
9
9
|
const attribute_chain_1 = require("./attribute_chain");
|
|
10
10
|
const dereference_1 = require("./dereference");
|
|
11
|
+
const _dynamic_access_1 = require("./_dynamic_access");
|
|
11
12
|
// todo, COND and SWITCH are quite similar?
|
|
12
13
|
// this class is used quite often, so its nice to have the differentiating tokens part of it
|
|
13
14
|
class Source extends combi_1.Expression {
|
|
@@ -15,7 +16,8 @@ class Source extends combi_1.Expression {
|
|
|
15
16
|
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentChain);
|
|
16
17
|
const attr = (0, combi_1.seq)(_1.Arrow, attribute_chain_1.AttributeChain);
|
|
17
18
|
const deref = (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v756, dereference_1.Dereference));
|
|
18
|
-
const
|
|
19
|
+
const dynChain = (0, combi_1.star)((0, combi_1.altPrio)((0, _dynamic_access_1.dynAttr)(), (0, _dynamic_access_1.dynComp)(), dereference_1.Dereference));
|
|
20
|
+
const method = (0, combi_1.seq)(_1.MethodCallChain, (0, combi_1.optPrio)((0, combi_1.altPrio)(attr, comp)), deref, dynChain);
|
|
19
21
|
const rparen = (0, combi_1.tok)(tokens_1.WParenRightW);
|
|
20
22
|
const rparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
21
23
|
const lparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW));
|
|
@@ -17,7 +17,7 @@ class SQLIn extends combi_1.Expression {
|
|
|
17
17
|
const listNeww = (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP);
|
|
18
18
|
const subSelect = sql_set_op_group_1.SQLSetOpGroup;
|
|
19
19
|
// simple subquery for pre-v750 versions: IN ( SELECT ... ), https://github.com/abaplint/abaplint/issues/3999
|
|
20
|
-
const simpleSubSelect = (0, combi_1.seq)("(", (0, _select_core_1.buildSelectCore)(undefined, false), ")");
|
|
20
|
+
const simpleSubSelect = (0, combi_1.seq)("(", "SELECT", (0, _select_core_1.buildSelectCore)(undefined, false), ")");
|
|
21
21
|
const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(subSelect, simpleSubSelect, listOld, listNeww, _1.SQLSource));
|
|
22
22
|
return inn;
|
|
23
23
|
}
|
|
@@ -7,7 +7,7 @@ const sql_set_op_group_1 = require("./sql_set_op_group");
|
|
|
7
7
|
const _select_core_1 = require("./_select_core");
|
|
8
8
|
class SQLSetOp extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
|
-
const operand = (0, combi_1.altPrio)(sql_set_op_group_1.SQLSetOpGroup, (0, _select_core_1.buildSelectCore)(
|
|
10
|
+
const operand = (0, combi_1.altPrio)(sql_set_op_group_1.SQLSetOpGroup, (0, combi_1.seq)("SELECT", (0, _select_core_1.buildSelectCore)(false, false)));
|
|
11
11
|
const union = (0, combi_1.seq)("UNION", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")));
|
|
12
12
|
const intersectExcept = (0, combi_1.altPrio)((0, combi_1.seq)("INTERSECT", (0, combi_1.optPrio)("DISTINCT")), (0, combi_1.seq)("EXCEPT", (0, combi_1.optPrio)("DISTINCT")));
|
|
13
13
|
const op = (0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v750, union, version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v756, intersectExcept));
|
|
@@ -7,7 +7,7 @@ const version_1 = require("../../../version");
|
|
|
7
7
|
const _select_core_1 = require("./_select_core");
|
|
8
8
|
class SQLSetOpGroup extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
|
-
const operand = (0, combi_1.altPrio)(SQLSetOpGroup, (0, _select_core_1.buildSelectCore)(
|
|
10
|
+
const operand = (0, combi_1.altPrio)(SQLSetOpGroup, (0, combi_1.seq)("SELECT", (0, _select_core_1.buildSelectCore)(false, false)));
|
|
11
11
|
const chain = (0, combi_1.seq)(operand, (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)(_1.SQLSetOp), version_1.Version.OpenABAP), (0, combi_1.optPrio)(_1.SQLOrderBy))));
|
|
12
12
|
return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("(", chain, ")"), version_1.Version.OpenABAP);
|
|
13
13
|
}
|
|
@@ -6,11 +6,12 @@ const _1 = require(".");
|
|
|
6
6
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
7
|
const attribute_name_1 = require("./attribute_name");
|
|
8
8
|
const dereference_1 = require("./dereference");
|
|
9
|
+
const _dynamic_access_1 = require("./_dynamic_access");
|
|
9
10
|
class Target extends combi_1.Expression {
|
|
10
11
|
getRunnable() {
|
|
11
12
|
const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), attribute_name_1.AttributeName);
|
|
12
13
|
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentName);
|
|
13
|
-
const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(dereference_1.Dereference, attr, comp, _1.TableExpression));
|
|
14
|
+
const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(dereference_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)(), comp, _1.TableExpression));
|
|
14
15
|
const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName);
|
|
15
16
|
const start = (0, combi_1.altPrio)(_1.Cast, _1.NewObject, clas, _1.TargetField, _1.TargetFieldSymbol);
|
|
16
17
|
const fields = (0, combi_1.seq)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
|
|
@@ -37,9 +37,15 @@ exports.SQLIn = void 0;
|
|
|
37
37
|
const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
38
38
|
const basic_1 = require("../../types/basic");
|
|
39
39
|
const _syntax_input_1 = require("../_syntax_input");
|
|
40
|
+
const sql_set_op_group_1 = require("./sql_set_op_group");
|
|
40
41
|
const sql_source_1 = require("./sql_source");
|
|
41
42
|
class SQLIn {
|
|
42
43
|
static runSyntax(node, input) {
|
|
44
|
+
const setop = node.findDirectExpression(Expressions.SQLSetOpGroup);
|
|
45
|
+
if (setop) {
|
|
46
|
+
sql_set_op_group_1.SQLSetOpGroup.runSyntax(setop, input);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
43
49
|
if (node.getChildren().length === 2) {
|
|
44
50
|
const insource = node.findFirstExpression(Expressions.SQLSource);
|
|
45
51
|
if (insource) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SQLSetOpGroup = void 0;
|
|
37
|
+
const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
38
|
+
const select_1 = require("./select");
|
|
39
|
+
class SQLSetOpGroup {
|
|
40
|
+
static runSyntax(node, input) {
|
|
41
|
+
if (node.findDirectExpression(Expressions.SQLFrom)) {
|
|
42
|
+
select_1.Select.runSyntax(node, input, true);
|
|
43
|
+
}
|
|
44
|
+
for (const group of node.findDirectExpressions(Expressions.SQLSetOpGroup)) {
|
|
45
|
+
SQLSetOpGroup.runSyntax(group, input);
|
|
46
|
+
}
|
|
47
|
+
for (const setop of node.findDirectExpressions(Expressions.SQLSetOp)) {
|
|
48
|
+
SQLSetOpGroup.runSyntax(setop, input);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.SQLSetOpGroup = SQLSetOpGroup;
|
|
53
|
+
//# sourceMappingURL=sql_set_op_group.js.map
|
package/build/src/registry.js
CHANGED