@abaplint/core 2.113.176 → 2.113.178
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 +1 -1
- package/build/src/abap/2_statements/expressions/sql_field_list.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_field_list_loop.js +2 -2
- package/build/src/abap/2_statements/expressions/sql_target.js +1 -1
- package/build/src/abap/5_syntax/expressions/select.js +39 -3
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -6040,7 +6040,7 @@ export declare class SkipLogic {
|
|
|
6040
6040
|
private isGeneratedBOPFInterface;
|
|
6041
6041
|
private isGeneratedProxyInterface;
|
|
6042
6042
|
private isGeneratedProxyClass;
|
|
6043
|
-
|
|
6043
|
+
isGeneratedFunctionGroup(group: FunctionGroup): boolean;
|
|
6044
6044
|
private isGeneratedGatewayClass;
|
|
6045
6045
|
private isGeneratedPersistentClass;
|
|
6046
6046
|
}
|
|
@@ -8,7 +8,7 @@ const tokens_1 = require("../../1_lexer/tokens");
|
|
|
8
8
|
class SQLFieldList extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
10
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
11
|
-
const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)));
|
|
11
|
+
const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)), version_1.Version.OpenABAP);
|
|
12
12
|
const old = (0, combi_1.starPrio)(_1.SQLField);
|
|
13
13
|
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)), paren);
|
|
14
14
|
}
|
|
@@ -9,10 +9,10 @@ const tokens_1 = require("../../1_lexer/tokens");
|
|
|
9
9
|
// loop must include one field from the database table
|
|
10
10
|
class SQLFieldListLoop extends combi_1.Expression {
|
|
11
11
|
getRunnable() {
|
|
12
|
-
const comma = (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp05, ","));
|
|
12
|
+
const comma = (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp05, ",", version_1.Version.OpenABAP));
|
|
13
13
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
14
14
|
const someField = (0, combi_1.seq)(_1.SQLField, comma);
|
|
15
|
-
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2));
|
|
15
|
+
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
|
|
16
16
|
const fieldList = (0, combi_1.seq)((0, combi_1.star)(someField), (0, combi_1.alt)(_1.SQLFieldName, abap, sql_path_1.SQLPath, _1.Constant), (0, combi_1.optPrio)(as), comma, (0, combi_1.star)(someField));
|
|
17
17
|
const fields = (0, combi_1.alt)("*", _1.Dynamic, fieldList);
|
|
18
18
|
return fields;
|
|
@@ -8,7 +8,7 @@ const _1 = require(".");
|
|
|
8
8
|
class SQLTarget extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
10
|
const n = (0, combi_1.ver)(version_1.Version.v754, "NEW");
|
|
11
|
-
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.opt)(n), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.tok)(tokens_1.At)), _1.Target));
|
|
11
|
+
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.opt)(n), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.tok)(tokens_1.At)), _1.Target), version_1.Version.OpenABAP);
|
|
12
12
|
return (0, combi_1.altPrio)(at, _1.Target);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -137,7 +137,7 @@ class Select {
|
|
|
137
137
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
static handleInto(node, input, fields, dbSources,
|
|
140
|
+
static handleInto(node, input, fields, dbSources, _isSingle) {
|
|
141
141
|
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
142
142
|
if (intoTable) {
|
|
143
143
|
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
@@ -148,8 +148,8 @@ class Select {
|
|
|
148
148
|
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
149
149
|
if (intoStructure) {
|
|
150
150
|
const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
|
|
151
|
-
if (inlineList.length === 1
|
|
152
|
-
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.
|
|
151
|
+
if (inlineList.length === 1) {
|
|
152
|
+
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildStructureType(fields, dbSources, input.scope));
|
|
153
153
|
}
|
|
154
154
|
else {
|
|
155
155
|
for (const inline of inlineList) {
|
|
@@ -227,6 +227,42 @@ class Select {
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
+
static buildStructureType(fields, dbSources, scope) {
|
|
231
|
+
var _a, _b, _c;
|
|
232
|
+
if (fields.length === 1 && dbSources.length === 1) {
|
|
233
|
+
const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
|
|
234
|
+
if (dbType === undefined) {
|
|
235
|
+
const name = ((_b = dbSources[0]) === null || _b === void 0 ? void 0 : _b.getName()) || "buildStructureTypeError";
|
|
236
|
+
if (scope.getRegistry().inErrorNamespace(name) === true) {
|
|
237
|
+
return new basic_1.UnknownType("Select, " + name + " not found");
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
return basic_1.VoidType.get((_c = dbSources[0]) === null || _c === void 0 ? void 0 : _c.getName());
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (fields[0].code === "*") {
|
|
244
|
+
return dbType;
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
if (dbType instanceof basic_1.StructureType) {
|
|
248
|
+
const field = dbType.getComponentByName(fields[0].code);
|
|
249
|
+
if (field) {
|
|
250
|
+
return field;
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
// todo: aggregated/calculated values
|
|
254
|
+
return basic_1.VoidType.get("SELECT_todo11");
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
return basic_1.VoidType.get("SELECT_todo10");
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
return basic_1.VoidType.get("SELECT_todo9");
|
|
264
|
+
}
|
|
265
|
+
}
|
|
230
266
|
static buildTableType(fields, dbSources, scope) {
|
|
231
267
|
if (dbSources.length !== 1) {
|
|
232
268
|
return basic_1.VoidType.get("SELECT_todo3");
|
package/build/src/registry.js
CHANGED