@abaplint/core 2.119.30 → 2.119.32
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/abaplint.d.ts +5 -0
- package/build/src/abap/2_statements/expressions/_select_core.js +7 -7
- package/build/src/abap/2_statements/expressions/field_length.js +1 -1
- package/build/src/abap/2_statements/expressions/index.js +1 -0
- package/build/src/abap/2_statements/expressions/sql_case.js +5 -4
- package/build/src/abap/2_statements/expressions/sql_client.js +4 -1
- package/build/src/abap/2_statements/expressions/sql_field.js +2 -4
- package/build/src/abap/2_statements/expressions/sql_from_source.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_group_by.js +8 -4
- package/build/src/abap/2_statements/expressions/sql_hints.js +2 -2
- package/build/src/abap/2_statements/expressions/sql_in.js +4 -1
- package/build/src/abap/2_statements/expressions/sql_join.js +3 -2
- package/build/src/abap/2_statements/expressions/sql_join_source.js +15 -0
- package/build/src/abap/2_statements/expressions/type_table.js +1 -1
- package/build/src/abap/2_statements/statements/class_definition.js +1 -1
- package/build/src/abap/2_statements/statements/modify_entities.js +1 -1
- package/build/src/abap/2_statements/statements/read_entities.js +1 -1
- package/build/src/abap/types/method_parameters.js +2 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/select_single_full_key.js +4 -6
- package/package.json +6 -5
package/build/abaplint.d.ts
CHANGED
|
@@ -2593,6 +2593,7 @@ declare namespace Expressions {
|
|
|
2593
2593
|
SQLFieldListLoopGreedy,
|
|
2594
2594
|
SQLIntoTable,
|
|
2595
2595
|
SQLJoin,
|
|
2596
|
+
SQLJoinSource,
|
|
2596
2597
|
SQLOptions,
|
|
2597
2598
|
SQLPackageSize,
|
|
2598
2599
|
SQLOrderBy,
|
|
@@ -6485,6 +6486,10 @@ declare class SQLJoin extends Expression {
|
|
|
6485
6486
|
getRunnable(): IStatementRunnable;
|
|
6486
6487
|
}
|
|
6487
6488
|
|
|
6489
|
+
declare class SQLJoinSource extends Expression {
|
|
6490
|
+
getRunnable(): IStatementRunnable;
|
|
6491
|
+
}
|
|
6492
|
+
|
|
6488
6493
|
declare class SQLOptions extends Expression {
|
|
6489
6494
|
getRunnable(): IStatementRunnable;
|
|
6490
6495
|
}
|
|
@@ -30,14 +30,14 @@ function buildSelectCore(into, allowOrderBy = true) {
|
|
|
30
30
|
const singleBody = (0, combi_1.seq)(_1.SQLFrom, client, byp, whereClause, groupHaving, trailingOpts);
|
|
31
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)));
|
|
32
32
|
}
|
|
33
|
-
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));
|
|
34
|
-
const trailingInto = (0, combi_1.seq)((0, combi_1.optPrio)((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.SQLOrderBy), (0, combi_1.optPrio)(_1.SQLOptions))), (0, combi_1.optPrio)((0, combi_1.seq)(intoSingle, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (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), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, (0, combi_1.optPrio)(_1.SQLOptions)), (0, combi_1.seq)(intoSingle, byp, fae, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, whereClause, groupHaving, ...orderUpOff, trailingOpts, (0, combi_1.optPrio)(_1.SQLOptions)), (0, combi_1.seq)(fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto)));
|
|
36
|
-
const selectTableIntoThenFrom = (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), afterFromWithInto);
|
|
37
|
-
const selectOtherIntoThenFrom = (0, combi_1.seq)(intoAny, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, afterFromWithInto);
|
|
33
|
+
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
|
+
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, (0, combi_1.optPrio)(_1.SQLOptions)), (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.optPrio)(_1.SQLOptions)), (0, combi_1.seq)(fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto)));
|
|
36
|
+
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)(intoAny, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
|
|
38
38
|
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
|
-
const singleAfterFrom = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle)), (0, combi_1.seq)(intoSingle, byp, whereClause, groupHaving, trailingOpts), (0, combi_1.seq)(whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle))));
|
|
40
|
-
const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, whereClause, groupHaving, trailingOpts);
|
|
39
|
+
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))));
|
|
40
|
+
const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), whereClause, groupHaving, trailingOpts);
|
|
41
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));
|
|
42
42
|
}
|
|
43
43
|
//# sourceMappingURL=_select_core.js.map
|
|
@@ -7,7 +7,7 @@ const _1 = require(".");
|
|
|
7
7
|
class FieldLength extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
9
|
const normal = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.Plus)), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
|
|
10
|
-
const length = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.optPrio)((0, combi_1.altPrio)(normal, "*")), (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
10
|
+
const length = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.optPrio)((0, combi_1.altPrio)(normal, "*")), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
|
|
11
11
|
return length;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -206,6 +206,7 @@ __exportStar(require("./sql_into_structure"), exports);
|
|
|
206
206
|
__exportStar(require("./sql_field_list_loop_greedy"), exports);
|
|
207
207
|
__exportStar(require("./sql_into_table"), exports);
|
|
208
208
|
__exportStar(require("./sql_join"), exports);
|
|
209
|
+
__exportStar(require("./sql_join_source"), exports);
|
|
209
210
|
__exportStar(require("./sql_options"), exports);
|
|
210
211
|
__exportStar(require("./sql_package_size"), exports);
|
|
211
212
|
__exportStar(require("./sql_order_by"), exports);
|
|
@@ -14,11 +14,12 @@ class SQLCase extends combi_1.Expression {
|
|
|
14
14
|
const abap = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2);
|
|
15
15
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
|
|
16
16
|
const sub = (0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
17
|
-
const
|
|
17
|
+
const source = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_field_name_1.SQLFieldName, sql_source_1.SQLSource, constant_1.Constant);
|
|
18
|
+
const parenSource = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
18
19
|
const val = (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant, abap);
|
|
19
|
-
const when = (0, combi_1.seq)("WHEN", val, "THEN",
|
|
20
|
-
const
|
|
21
|
-
return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(
|
|
20
|
+
const when = (0, combi_1.seq)("WHEN", val, "THEN", (0, combi_1.altPrio)(parenSource, (0, combi_1.seq)((0, combi_1.optPrio)("-"), source)), (0, combi_1.starPrio)(sub));
|
|
21
|
+
const else_ = (0, combi_1.seq)("ELSE", (0, combi_1.altPrio)(parenSource, (0, combi_1.seq)((0, combi_1.optPrio)("-"), source)));
|
|
22
|
+
return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(else_), "END"), version_1.Version.OpenABAP);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
exports.SQLCase = SQLCase;
|
|
@@ -4,9 +4,12 @@ exports.SQLClient = void 0;
|
|
|
4
4
|
const version_1 = require("../../../version");
|
|
5
5
|
const combi_1 = require("../combi");
|
|
6
6
|
const sql_source_simple_1 = require("./sql_source_simple");
|
|
7
|
+
const sql_alias_field_1 = require("./sql_alias_field");
|
|
8
|
+
const dynamic_1 = require("./dynamic");
|
|
7
9
|
class SQLClient extends combi_1.Expression {
|
|
8
10
|
getRunnable() {
|
|
9
|
-
const
|
|
11
|
+
const clientList = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.alt)(dynamic_1.Dynamic, (0, combi_1.seq)(sql_alias_field_1.SQLAliasField, (0, combi_1.starPrio)((0, combi_1.seq)(",", sql_alias_field_1.SQLAliasField)))));
|
|
12
|
+
const client = (0, combi_1.alt)((0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.seq)("CLIENT SPECIFIED", (0, combi_1.optPrio)(clientList))), (0, combi_1.seq)("USING", (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CLIENT", sql_source_simple_1.SQLSourceSimple)), (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("CLIENTS IN", (0, combi_1.alt)(sql_source_simple_1.SQLSourceSimple, "T000"))), (0, combi_1.ver)(version_1.Version.v754, "ALL CLIENTS"))));
|
|
10
13
|
return client;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
@@ -17,15 +17,13 @@ class SQLField extends combi_1.Expression {
|
|
|
17
17
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, fieldNoAgg);
|
|
18
18
|
const parenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), field, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
19
19
|
const parenFieldNoAgg = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), fieldNoAgg, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
20
|
-
// without aggregates: from v740sp05
|
|
21
20
|
const subNoAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenFieldNoAgg, fieldNoAgg)));
|
|
22
21
|
const arithNoAgg = (0, combi_1.ver)(version_1.Version.v740sp05, subNoAgg);
|
|
23
|
-
// with aggregates: from v754
|
|
24
22
|
const subWithAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
|
|
25
23
|
const arithWithAgg = (0, combi_1.ver)(version_1.Version.v754, subWithAgg);
|
|
26
24
|
const arith = (0, combi_1.altPrio)(arithWithAgg, arithNoAgg);
|
|
27
|
-
const arithSequence = (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith));
|
|
28
|
-
const parenArithSequence = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), arithSequence, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
25
|
+
const arithSequence = (0, combi_1.seq)((0, combi_1.optPrio)("-"), field, (0, combi_1.optPrio)(arith));
|
|
26
|
+
const parenArithSequence = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.optPrio)("-"), arithSequence, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
29
27
|
// allows (a-b)*(c-d) — paren groups as operands, defined after parenArithSequence
|
|
30
28
|
const subExtWithAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenArithSequence, parenField, field)));
|
|
31
29
|
const subExtNoAgg = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenArithSequence, parenFieldNoAgg, fieldNoAgg)));
|
|
@@ -9,7 +9,7 @@ const with_name_1 = require("./with_name");
|
|
|
9
9
|
class SQLFromSource extends combi_1.Expression {
|
|
10
10
|
getRunnable() {
|
|
11
11
|
// https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-752-open_sql.htm#!ABAP_MODIFICATION_1@1@
|
|
12
|
-
const tab = (0, combi_1.ver)(version_1.Version.v752, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.FieldChain));
|
|
12
|
+
const tab = (0, combi_1.ver)(version_1.Version.v752, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.FieldChain), version_1.Version.OpenABAP);
|
|
13
13
|
const aas = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
14
14
|
const privileged = (0, combi_1.ver)(version_1.Version.v752, (0, combi_1.seq)("WITH", _1.SQLPrivilegedAccess));
|
|
15
15
|
return (0, combi_1.seq)((0, combi_1.altPrio)(with_name_1.WithName, (0, combi_1.seq)(_1.DatabaseTable, (0, combi_1.optPrio)(_1.SQLCDSParameters)), tab), (0, combi_1.optPrio)(privileged), (0, combi_1.optPrio)(aas));
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SQLGroupBy = void 0;
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
|
+
const version_1 = require("../../../version");
|
|
5
6
|
const dynamic_1 = require("./dynamic");
|
|
6
7
|
const sql_field_name_1 = require("./sql_field_name");
|
|
8
|
+
const sql_field_1 = require("./sql_field");
|
|
7
9
|
class SQLGroupBy extends combi_1.Expression {
|
|
8
10
|
getRunnable() {
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const fieldName = (0, combi_1.alt)(sql_field_name_1.SQLFieldName, dynamic_1.Dynamic);
|
|
12
|
+
const expr = (0, combi_1.ver)(version_1.Version.v740sp02, sql_field_1.SQLField, version_1.Version.OpenABAP);
|
|
13
|
+
const newGroup = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("GROUP BY", expr, (0, combi_1.altPrio)((0, combi_1.plus)((0, combi_1.seq)(",", expr)), (0, combi_1.optPrio)((0, combi_1.plus)(fieldName)))), version_1.Version.OpenABAP);
|
|
14
|
+
const old = (0, combi_1.seq)((0, combi_1.plus)((0, combi_1.seq)(fieldName, ",")), fieldName);
|
|
15
|
+
const oldGroup = (0, combi_1.seq)("GROUP BY", (0, combi_1.altPrio)(old, (0, combi_1.plus)(fieldName)));
|
|
16
|
+
return (0, combi_1.altPrio)(newGroup, oldGroup);
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
exports.SQLGroupBy = SQLGroupBy;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SQLHints = void 0;
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
|
-
const
|
|
5
|
+
const sql_source_1 = require("./sql_source");
|
|
6
6
|
class SQLHints extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
8
|
const type = (0, combi_1.altPrio)("ORACLE", "ADABAS", "AS400", "DB2", "HDB", "MSSQLNT", "SYBASE", "DB6", "INFORMIX");
|
|
9
|
-
const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type,
|
|
9
|
+
const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, sql_source_1.SQLSource)));
|
|
10
10
|
return ret;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -6,6 +6,7 @@ const _1 = require(".");
|
|
|
6
6
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
7
|
const version_1 = require("../../../version");
|
|
8
8
|
const sql_set_op_group_1 = require("./sql_set_op_group");
|
|
9
|
+
const _select_core_1 = require("./_select_core");
|
|
9
10
|
class SQLIn extends combi_1.Expression {
|
|
10
11
|
getRunnable() {
|
|
11
12
|
const val = new _1.SQLSource();
|
|
@@ -15,7 +16,9 @@ class SQLIn extends combi_1.Expression {
|
|
|
15
16
|
// version is a guess, https://github.com/abaplint/abaplint/issues/2530
|
|
16
17
|
const listNeww = (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP);
|
|
17
18
|
const subSelect = sql_set_op_group_1.SQLSetOpGroup;
|
|
18
|
-
|
|
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), ")");
|
|
21
|
+
const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(subSelect, simpleSubSelect, listOld, listNeww, _1.SQLSource));
|
|
19
22
|
return inn;
|
|
20
23
|
}
|
|
21
24
|
}
|
|
@@ -4,11 +4,12 @@ exports.SQLJoin = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
const _1 = require(".");
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
|
+
const sql_join_source_1 = require("./sql_join_source");
|
|
7
8
|
class SQLJoin extends combi_1.Expression {
|
|
8
9
|
getRunnable() {
|
|
9
10
|
const joinType = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("INNER", "LEFT OUTER", "LEFT", "RIGHT OUTER", "RIGHT")), "JOIN");
|
|
10
|
-
const join = (0, combi_1.seq)(joinType,
|
|
11
|
-
const crossJoin = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("CROSS JOIN",
|
|
11
|
+
const join = (0, combi_1.seq)(joinType, new sql_join_source_1.SQLJoinSource(), "ON", _1.SQLCond);
|
|
12
|
+
const crossJoin = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("CROSS JOIN", new sql_join_source_1.SQLJoinSource()), version_1.Version.OpenABAP);
|
|
12
13
|
return (0, combi_1.altPrio)(crossJoin, join);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SQLJoinSource = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
|
+
const sql_join_1 = require("./sql_join");
|
|
8
|
+
class SQLJoinSource extends combi_1.Expression {
|
|
9
|
+
getRunnable() {
|
|
10
|
+
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.altPrio)(new SQLJoinSource(), _1.SQLFromSource), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), new sql_join_1.SQLJoin())), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
11
|
+
return (0, combi_1.altPrio)(paren, _1.SQLFromSource);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.SQLJoinSource = SQLJoinSource;
|
|
15
|
+
//# sourceMappingURL=sql_join_source.js.map
|
|
@@ -19,7 +19,7 @@ class TypeTable extends combi_1.Expression {
|
|
|
19
19
|
// "WITH" is not allowed as a field name in keys
|
|
20
20
|
const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial))), (0, combi_1.optPrio)("VALUE IS INITIAL")));
|
|
21
21
|
const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
|
|
22
|
-
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "REPORTED EARLY", "READ IMPORT", "FAILED EARLY", "FAILED", "LOCK", "DETERMINATION", "READ RESULT", "UPDATE", "DELETE"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)));
|
|
22
|
+
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "REPORTED EARLY", "READ IMPORT", "FAILED EARLY", "FAILED", "LOCK", "DETERMINATION", "READ RESULT", "UPDATE", "DELETE"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)), version_1.Version.OpenABAP);
|
|
23
23
|
const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
24
24
|
const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
25
25
|
const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
|
|
@@ -11,7 +11,7 @@ class ClassDefinition {
|
|
|
11
11
|
const risk = (0, combi_1.seq)("RISK LEVEL", level);
|
|
12
12
|
const time = (0, combi_1.altPrio)("LONG", "MEDIUM", "SHORT");
|
|
13
13
|
const duration = (0, combi_1.seq)("DURATION", time);
|
|
14
|
-
const blah = (0, combi_1.per)(expressions_1.ClassGlobal, expressions_1.ClassFinal, "ABSTRACT", (0, combi_1.seq)("INHERITING FROM", expressions_1.SuperClassName), create, "FOR TESTING", risk, "SHARED MEMORY ENABLED", duration, (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("FOR BEHAVIOR OF", expressions_1.BehaviorDefinitionName)), expressions_1.ClassFriends);
|
|
14
|
+
const blah = (0, combi_1.per)(expressions_1.ClassGlobal, expressions_1.ClassFinal, "ABSTRACT", (0, combi_1.seq)("INHERITING FROM", expressions_1.SuperClassName), create, "FOR TESTING", risk, "SHARED MEMORY ENABLED", duration, (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("FOR BEHAVIOR OF", expressions_1.BehaviorDefinitionName), version_1.Version.OpenABAP), expressions_1.ClassFriends);
|
|
15
15
|
const def = (0, combi_1.seq)("DEFINITION", (0, combi_1.optPrio)(blah));
|
|
16
16
|
return (0, combi_1.seq)("CLASS", expressions_1.ClassName, def);
|
|
17
17
|
}
|
|
@@ -27,7 +27,7 @@ class ModifyEntities {
|
|
|
27
27
|
const create3 = (0, combi_1.seq)("CREATE BY", expressions_1.AssociationName, fieldsWith);
|
|
28
28
|
const create4 = (0, combi_1.seq)("CREATE FROM", expressions_1.Source, (0, combi_1.plus)((0, combi_1.seq)("CREATE BY", expressions_1.AssociationName, "FROM", expressions_1.Source)));
|
|
29
29
|
const entity = (0, combi_1.seq)("ENTITY", (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.EntityAssociation), (0, combi_1.alt)(execute, create, updateFields, deleteFrom, updateSetFields, updateFrom, create2, create3, create4));
|
|
30
|
-
return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity), end));
|
|
30
|
+
return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity), end), version_1.Version.OpenABAP);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.ModifyEntities = ModifyEntities;
|
|
@@ -20,7 +20,7 @@ class ReadEntities {
|
|
|
20
20
|
const by = (0, combi_1.seq)("BY", expressions_1.AssociationName, fields);
|
|
21
21
|
const sub = (0, combi_1.seq)((0, combi_1.alt)(all, fields, from, by, byall), result);
|
|
22
22
|
const single = (0, combi_1.seq)("ENTITY", (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.EntityAssociation), (0, combi_1.plus)(sub), (0, combi_1.optPrio)(failed), (0, combi_1.optPrio)(reported));
|
|
23
|
-
return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("READ", (0, combi_1.alt)(s, single)));
|
|
23
|
+
return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("READ", (0, combi_1.alt)(s, single)), version_1.Version.OpenABAP);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.ReadEntities = ReadEntities;
|
|
@@ -234,7 +234,9 @@ class MethodParameters {
|
|
|
234
234
|
|| concat.includes(" FOR DETERMINE ")
|
|
235
235
|
|| concat.includes(" FOR FEATURES ")
|
|
236
236
|
|| concat.includes(" FOR INSTANCE FEATURES ")
|
|
237
|
+
|| concat.includes(" FOR GLOBAL AUTHORIZATION ")
|
|
237
238
|
|| concat.includes(" FOR LOCK ")
|
|
239
|
+
|| concat.includes(" FOR PRECHECK ")
|
|
238
240
|
|| concat.includes(" FOR NUMBERING ")
|
|
239
241
|
|| concat.includes(" FOR READ ")
|
|
240
242
|
|| concat.includes(" FOR VALIDATION ")
|
package/build/src/registry.js
CHANGED
|
@@ -142,12 +142,10 @@ If the statement contains a JOIN it is not checked`,
|
|
|
142
142
|
set.add(key);
|
|
143
143
|
}
|
|
144
144
|
for (const compare of (cond === null || cond === void 0 ? void 0 : cond.findAllExpressionsRecursive(Expressions.SQLCompare)) || []) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
set.delete(fname);
|
|
150
|
-
}
|
|
145
|
+
const fname = (_a = compare.findDirectExpression(Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
146
|
+
const operator = (_b = compare.findDirectExpression(Expressions.SQLCompareOperator)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
|
|
147
|
+
if (fname && (operator === "=" || operator === "EQ")) {
|
|
148
|
+
set.delete(fname);
|
|
151
149
|
}
|
|
152
150
|
}
|
|
153
151
|
if (set.size > 0) {
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.32",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
7
7
|
"funding": "https://github.com/sponsors/larshp",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"lint": "eslint src/**/*.ts test/**/*.ts",
|
|
10
|
-
"lint:fix": "eslint src/**/*.ts test/**/*.ts --fix",
|
|
9
|
+
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
10
|
+
"lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
|
|
11
11
|
"compile": "tsc && node scripts/version.js",
|
|
12
|
+
"watch": "tsc --watch",
|
|
12
13
|
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
13
14
|
"test:only": "npm run compile && mocha --timeout 1000000",
|
|
14
15
|
"test:parallel": "npm run compile && mocha --timeout 1000 --parallel --reporter dot",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
},
|
|
51
52
|
"homepage": "https://abaplint.org",
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.58.
|
|
54
|
+
"@microsoft/api-extractor": "^7.58.9",
|
|
54
55
|
"@types/chai": "^4.3.20",
|
|
55
56
|
"@types/mocha": "^10.0.10",
|
|
56
57
|
"@types/node": "^24.13.2",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"typescript": "^6.0.3"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
|
-
"fast-xml-parser": "^5.
|
|
67
|
+
"fast-xml-parser": "^5.9.0",
|
|
67
68
|
"json5": "^2.2.3",
|
|
68
69
|
"vscode-languageserver-types": "^3.18.0"
|
|
69
70
|
}
|