@abaplint/cli 2.119.33 → 2.119.35
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/cli.js +29 -15
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -3034,7 +3034,7 @@ function buildSelectSingleCore(allowInto = false) {
|
|
|
3034
3034
|
const singleBody = (0, combi_1.seq)(_1.SQLFrom, client, byp, whereClause, groupHaving, trailingOpts);
|
|
3035
3035
|
return (0, combi_1.seq)(fieldList, singleBody);
|
|
3036
3036
|
}
|
|
3037
|
-
const singleAfterFrom = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.altPrio)((0, combi_1.seq)(
|
|
3037
|
+
const singleAfterFrom = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.altPrio)((0, combi_1.seq)(intoSingle, byp, whereClause, groupHaving, trailingOpts), (0, combi_1.seq)((0, combi_1.optPrio)(sqlFields), whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle), (0, combi_1.optPrio)(_1.DatabaseConnection))));
|
|
3038
3038
|
const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), whereClause, groupHaving, trailingOpts);
|
|
3039
3039
|
return (0, combi_1.seq)(fieldList, byp, (0, combi_1.altPrio)(singleIntoBeforeFrom, singleAfterFrom));
|
|
3040
3040
|
}
|
|
@@ -3056,15 +3056,15 @@ function buildSelectCore(allowInto = false, allowOrderBy = true) {
|
|
|
3056
3056
|
const intoSingle = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
3057
3057
|
const intoForPackSize = _1.SQLIntoTable;
|
|
3058
3058
|
if (!allowInto) {
|
|
3059
|
-
const afterFromNoInto = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.
|
|
3059
|
+
const afterFromNoInto = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.seq)((0, combi_1.optPrio)(sqlFields), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts));
|
|
3060
3060
|
return (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", buildSelectSingleCore(false)), (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, byp, afterFromNoInto));
|
|
3061
3061
|
}
|
|
3062
3062
|
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));
|
|
3063
|
-
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)
|
|
3064
|
-
const afterFromWithInto = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLFrom), client, byp, fromPackSize, (0, combi_1.altPrio)((0, combi_1.seq)(
|
|
3065
|
-
const selectTableIntoThenFrom = (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize)
|
|
3066
|
-
const selectOtherIntoThenFrom =
|
|
3067
|
-
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)
|
|
3063
|
+
const trailingInto = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)((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.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset)))), (0, combi_1.optPrio)(_1.SQLOptions));
|
|
3064
|
+
const afterFromWithInto = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLFrom), client, byp, fromPackSize, (0, combi_1.altPrio)((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)((0, combi_1.optPrio)(sqlFields), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto)));
|
|
3065
|
+
const selectTableIntoThenFrom = (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize));
|
|
3066
|
+
const selectOtherIntoThenFrom = intoSingle;
|
|
3067
|
+
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.optPrio)((0, combi_1.altPrio)(selectTableIntoThenFrom, selectOtherIntoThenFrom)), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
|
|
3068
3068
|
return (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", buildSelectSingleCore(true)), nonSingleBody);
|
|
3069
3069
|
}
|
|
3070
3070
|
//# sourceMappingURL=_select_core.js.map
|
|
@@ -7565,19 +7565,22 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
|
|
|
7565
7565
|
const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
|
|
7566
7566
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
|
|
7567
7567
|
const sql_set_op_group_1 = __webpack_require__(/*! ./sql_set_op_group */ "../core/build/src/abap/2_statements/expressions/sql_set_op_group.js");
|
|
7568
|
+
const _select_core_1 = __webpack_require__(/*! ./_select_core */ "../core/build/src/abap/2_statements/expressions/_select_core.js");
|
|
7568
7569
|
class SQLCompare extends combi_1.Expression {
|
|
7569
7570
|
getRunnable() {
|
|
7570
7571
|
const subSelect = (0, combi_1.ver)(version_1.Version.v750, sql_set_op_group_1.SQLSetOpGroup, version_1.Version.OpenABAP);
|
|
7572
|
+
const simpleSubSelect = (0, combi_1.seq)("(", "SELECT", (0, _select_core_1.buildSelectCore)(undefined, false), ")");
|
|
7573
|
+
const simpleScalarSubSelect = (0, combi_1.ver)(version_1.Version.v740sp08, simpleSubSelect, version_1.Version.OpenABAP);
|
|
7571
7574
|
const between = (0, combi_1.seq)("BETWEEN", _1.SQLSource, "AND", _1.SQLSource);
|
|
7572
7575
|
const like = (0, combi_1.seq)("LIKE", _1.SQLSource, (0, combi_1.optPrio)((0, combi_1.seq)("ESCAPE", _1.SQLSource)));
|
|
7573
7576
|
const nul = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("NULL", (0, combi_1.ver)(version_1.Version.v753, "INITIAL")));
|
|
7574
|
-
const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), subSelect);
|
|
7577
|
+
const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), (0, combi_1.altPrio)(subSelect, simpleScalarSubSelect));
|
|
7575
7578
|
const source = new _1.SQLSource();
|
|
7576
7579
|
const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)), version_1.Version.OpenABAP);
|
|
7577
7580
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
7578
7581
|
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
|
|
7579
7582
|
const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLCase, _1.SQLAggregation, _1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, _1.SQLCase, _1.SQLAggregation, _1.SQLFunction, (0, combi_1.seq)(source, (0, combi_1.optPrio)(arith)))), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
|
|
7580
|
-
const exists = (0, combi_1.seq)("EXISTS", subSelect);
|
|
7583
|
+
const exists = (0, combi_1.seq)("EXISTS", (0, combi_1.altPrio)(subSelect, simpleSubSelect));
|
|
7581
7584
|
return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
|
|
7582
7585
|
}
|
|
7583
7586
|
}
|
|
@@ -26569,12 +26572,13 @@ class BasicTypes {
|
|
|
26569
26572
|
|| text.startsWith("TYPE TABLE FOR DELETE ")
|
|
26570
26573
|
|| text.startsWith("TYPE TABLE FOR UPDATE "))) {
|
|
26571
26574
|
const name = typename.concatTokens();
|
|
26572
|
-
const
|
|
26575
|
+
const ddlsName = this.getRAPBaseEntityName(name);
|
|
26576
|
+
const type = (_d = this.input.scope.getDDIC().lookupDDLS(ddlsName)) === null || _d === void 0 ? void 0 : _d.type;
|
|
26573
26577
|
if (type) {
|
|
26574
26578
|
return new Types.TableType(basic_1.VoidType.get("RAP-TODO"), options);
|
|
26575
26579
|
}
|
|
26576
|
-
else if (this.input.scope.getDDIC().inErrorNamespace(
|
|
26577
|
-
return new Types.UnknownType(`DDLS ${
|
|
26580
|
+
else if (this.input.scope.getDDIC().inErrorNamespace(ddlsName)) {
|
|
26581
|
+
return new Types.UnknownType(`DDLS ${ddlsName} not found`);
|
|
26578
26582
|
}
|
|
26579
26583
|
else {
|
|
26580
26584
|
return Types.VoidType.get(name);
|
|
@@ -26746,6 +26750,15 @@ class BasicTypes {
|
|
|
26746
26750
|
}
|
|
26747
26751
|
return false;
|
|
26748
26752
|
}
|
|
26753
|
+
getRAPBaseEntityName(name) {
|
|
26754
|
+
const association = name.indexOf("\\_");
|
|
26755
|
+
const path = name.indexOf("\\\\");
|
|
26756
|
+
if (association === -1 && path === -1) {
|
|
26757
|
+
return name;
|
|
26758
|
+
}
|
|
26759
|
+
const splitAt = association === -1 ? path : path === -1 ? association : Math.min(association, path);
|
|
26760
|
+
return name.substring(0, splitAt);
|
|
26761
|
+
}
|
|
26749
26762
|
// todo, rewrite this method
|
|
26750
26763
|
resolveTypeChain(expr) {
|
|
26751
26764
|
var _a, _b, _c, _d;
|
|
@@ -50220,7 +50233,9 @@ class MethodParameters {
|
|
|
50220
50233
|
}
|
|
50221
50234
|
workaroundRAP(node, input, parentName) {
|
|
50222
50235
|
const resultName = node.findExpressionAfterToken("RESULT");
|
|
50223
|
-
const
|
|
50236
|
+
const concat = node.concatTokens().toUpperCase();
|
|
50237
|
+
const isRap = node.findExpressionAfterToken("IMPORTING")
|
|
50238
|
+
|| (concat.includes(" IMPORTING REQUEST ") ? node.findExpressionAfterToken("REQUEST") : undefined);
|
|
50224
50239
|
if (isRap) {
|
|
50225
50240
|
for (const foo of node.findDirectExpressions(Expressions.MethodParamName)) {
|
|
50226
50241
|
if (foo === resultName) {
|
|
@@ -50228,7 +50243,6 @@ class MethodParameters {
|
|
|
50228
50243
|
}
|
|
50229
50244
|
this.importing.push(new _typed_identifier_1.TypedIdentifier(foo.getFirstToken(), input.filename, basic_1.VoidType.get("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
|
|
50230
50245
|
}
|
|
50231
|
-
const concat = node.concatTokens().toUpperCase();
|
|
50232
50246
|
if (concat.includes(" FOR VALIDATE ")
|
|
50233
50247
|
|| concat.includes(" FOR BEHAVIOR ")
|
|
50234
50248
|
|| concat.includes(" FOR DETERMINE ")
|
|
@@ -66148,7 +66162,7 @@ class Registry {
|
|
|
66148
66162
|
}
|
|
66149
66163
|
static abaplintVersion() {
|
|
66150
66164
|
// magic, see build script "version.js"
|
|
66151
|
-
return "2.119.
|
|
66165
|
+
return "2.119.35";
|
|
66152
66166
|
}
|
|
66153
66167
|
getDDICReferences() {
|
|
66154
66168
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.35",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.119.
|
|
41
|
+
"@abaplint/core": "^2.119.35",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|