@abaplint/core 2.113.174 → 2.113.176
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.
|
@@ -34,8 +34,10 @@ class Select {
|
|
|
34
34
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
+
const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE"
|
|
38
|
+
|| node.get() instanceof Expressions.SelectLoop;
|
|
37
39
|
this.checkFields(fields, dbSources, input, node);
|
|
38
|
-
this.handleInto(node, input, fields, dbSources);
|
|
40
|
+
this.handleInto(node, input, fields, dbSources, isSingle);
|
|
39
41
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
40
42
|
if (fae) {
|
|
41
43
|
input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
|
|
@@ -135,7 +137,7 @@ class Select {
|
|
|
135
137
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
|
-
static handleInto(node, input, fields, dbSources) {
|
|
140
|
+
static handleInto(node, input, fields, dbSources, isSingle) {
|
|
139
141
|
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
140
142
|
if (intoTable) {
|
|
141
143
|
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
@@ -145,9 +147,15 @@ class Select {
|
|
|
145
147
|
}
|
|
146
148
|
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
147
149
|
if (intoStructure) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
inline_data_1.InlineData.runSyntax(
|
|
150
|
+
const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
|
|
151
|
+
if (inlineList.length === 1 && fields.length === 1 && dbSources.length === 1 && isSingle === false) {
|
|
152
|
+
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildTableType(fields, dbSources, input.scope));
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
for (const inline of inlineList) {
|
|
156
|
+
// todo, for now these are voided
|
|
157
|
+
inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
|
|
158
|
+
}
|
|
151
159
|
}
|
|
152
160
|
}
|
|
153
161
|
const intoList = node.findDirectExpression(Expressions.SQLIntoList);
|
|
@@ -169,7 +177,7 @@ class Select {
|
|
|
169
177
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
170
178
|
return;
|
|
171
179
|
}
|
|
172
|
-
let type = basic_1.VoidType.get("
|
|
180
|
+
let type = basic_1.VoidType.get("SELECT_todo2");
|
|
173
181
|
if (isSimple.test(field.code)) {
|
|
174
182
|
for (const dbSource of dbSources) {
|
|
175
183
|
if (dbSource === undefined) {
|
|
@@ -221,15 +229,15 @@ class Select {
|
|
|
221
229
|
}
|
|
222
230
|
static buildTableType(fields, dbSources, scope) {
|
|
223
231
|
if (dbSources.length !== 1) {
|
|
224
|
-
return basic_1.VoidType.get("
|
|
232
|
+
return basic_1.VoidType.get("SELECT_todo3");
|
|
225
233
|
}
|
|
226
234
|
if (dbSources[0] === undefined) {
|
|
227
235
|
// then its a voided table
|
|
228
|
-
return basic_1.VoidType.get("
|
|
236
|
+
return basic_1.VoidType.get("SELECT_todo4");
|
|
229
237
|
}
|
|
230
238
|
const dbType = dbSources[0].parseType(scope.getRegistry());
|
|
231
239
|
if (!(dbType instanceof basic_1.StructureType)) {
|
|
232
|
-
return basic_1.VoidType.get("
|
|
240
|
+
return basic_1.VoidType.get("SELECT_todo5");
|
|
233
241
|
}
|
|
234
242
|
if (fields.length === 1 && fields[0].code === "*") {
|
|
235
243
|
return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
@@ -240,13 +248,13 @@ class Select {
|
|
|
240
248
|
for (const field of fields) {
|
|
241
249
|
const type = dbType.getComponentByName(field.code);
|
|
242
250
|
if (type === undefined) {
|
|
243
|
-
return basic_1.VoidType.get("
|
|
251
|
+
return basic_1.VoidType.get("SELECT_todo6");
|
|
244
252
|
}
|
|
245
253
|
components.push({ name: field.code, type });
|
|
246
254
|
}
|
|
247
255
|
return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
248
256
|
}
|
|
249
|
-
return basic_1.VoidType.get("
|
|
257
|
+
return basic_1.VoidType.get("SELECT_todo7");
|
|
250
258
|
}
|
|
251
259
|
static findFields(node, input) {
|
|
252
260
|
var _a, _b;
|
package/build/src/registry.js
CHANGED
|
@@ -2729,6 +2729,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
2729
2729
|
return false;
|
|
2730
2730
|
}
|
|
2731
2731
|
replaceXsdBool(node, lowFile, highSyntax) {
|
|
2732
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
2733
|
+
return undefined;
|
|
2734
|
+
}
|
|
2732
2735
|
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
2733
2736
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
2734
2737
|
if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference
|
|
@@ -32,6 +32,7 @@ class InlineDataOldVersions extends _abap_rule_1.ABAPRule {
|
|
|
32
32
|
runParsed(file) {
|
|
33
33
|
const issues = [];
|
|
34
34
|
if (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02
|
|
35
|
+
|| this.reg.getConfig().getVersion() === version_1.Version.OpenABAP
|
|
35
36
|
|| this.reg.getConfig().getVersion() === version_1.Version.Cloud) {
|
|
36
37
|
return [];
|
|
37
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.176",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.52.10",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^24.
|
|
56
|
+
"@types/node": "^24.3.0",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.33.0",
|
|
59
59
|
"mocha": "^11.7.1",
|