@abaplint/core 2.119.30 → 2.119.31
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/sql_from_source.js +1 -1
- 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/registry.js +1 -1
- package/build/src/rules/select_single_full_key.js +4 -6
- package/package.json +4 -3
|
@@ -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));
|
|
@@ -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;
|
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.31",
|
|
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",
|