@abaplint/cli 2.113.174 → 2.113.175
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 +23 -12
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -27799,8 +27799,9 @@ class Select {
|
|
|
27799
27799
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27800
27800
|
return;
|
|
27801
27801
|
}
|
|
27802
|
+
const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE";
|
|
27802
27803
|
this.checkFields(fields, dbSources, input, node);
|
|
27803
|
-
this.handleInto(node, input, fields, dbSources);
|
|
27804
|
+
this.handleInto(node, input, fields, dbSources, isSingle);
|
|
27804
27805
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
27805
27806
|
if (fae) {
|
|
27806
27807
|
input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
|
|
@@ -27900,7 +27901,7 @@ class Select {
|
|
|
27900
27901
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27901
27902
|
}
|
|
27902
27903
|
}
|
|
27903
|
-
static handleInto(node, input, fields, dbSources) {
|
|
27904
|
+
static handleInto(node, input, fields, dbSources, isSingle) {
|
|
27904
27905
|
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
27905
27906
|
if (intoTable) {
|
|
27906
27907
|
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
@@ -27910,9 +27911,15 @@ class Select {
|
|
|
27910
27911
|
}
|
|
27911
27912
|
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
27912
27913
|
if (intoStructure) {
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
inline_data_1.InlineData.runSyntax(
|
|
27914
|
+
const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
|
|
27915
|
+
if (inlineList.length === 1 && fields.length === 1 && dbSources.length === 1 && isSingle === false) {
|
|
27916
|
+
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildTableType(fields, dbSources, input.scope));
|
|
27917
|
+
}
|
|
27918
|
+
else {
|
|
27919
|
+
for (const inline of inlineList) {
|
|
27920
|
+
// todo, for now these are voided
|
|
27921
|
+
inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
|
|
27922
|
+
}
|
|
27916
27923
|
}
|
|
27917
27924
|
}
|
|
27918
27925
|
const intoList = node.findDirectExpression(Expressions.SQLIntoList);
|
|
@@ -27934,7 +27941,7 @@ class Select {
|
|
|
27934
27941
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27935
27942
|
return;
|
|
27936
27943
|
}
|
|
27937
|
-
let type = basic_1.VoidType.get("
|
|
27944
|
+
let type = basic_1.VoidType.get("SELECT_todo2");
|
|
27938
27945
|
if (isSimple.test(field.code)) {
|
|
27939
27946
|
for (const dbSource of dbSources) {
|
|
27940
27947
|
if (dbSource === undefined) {
|
|
@@ -27986,15 +27993,15 @@ class Select {
|
|
|
27986
27993
|
}
|
|
27987
27994
|
static buildTableType(fields, dbSources, scope) {
|
|
27988
27995
|
if (dbSources.length !== 1) {
|
|
27989
|
-
return basic_1.VoidType.get("
|
|
27996
|
+
return basic_1.VoidType.get("SELECT_todo3");
|
|
27990
27997
|
}
|
|
27991
27998
|
if (dbSources[0] === undefined) {
|
|
27992
27999
|
// then its a voided table
|
|
27993
|
-
return basic_1.VoidType.get("
|
|
28000
|
+
return basic_1.VoidType.get("SELECT_todo4");
|
|
27994
28001
|
}
|
|
27995
28002
|
const dbType = dbSources[0].parseType(scope.getRegistry());
|
|
27996
28003
|
if (!(dbType instanceof basic_1.StructureType)) {
|
|
27997
|
-
return basic_1.VoidType.get("
|
|
28004
|
+
return basic_1.VoidType.get("SELECT_todo5");
|
|
27998
28005
|
}
|
|
27999
28006
|
if (fields.length === 1 && fields[0].code === "*") {
|
|
28000
28007
|
return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
@@ -28005,13 +28012,13 @@ class Select {
|
|
|
28005
28012
|
for (const field of fields) {
|
|
28006
28013
|
const type = dbType.getComponentByName(field.code);
|
|
28007
28014
|
if (type === undefined) {
|
|
28008
|
-
return basic_1.VoidType.get("
|
|
28015
|
+
return basic_1.VoidType.get("SELECT_todo6");
|
|
28009
28016
|
}
|
|
28010
28017
|
components.push({ name: field.code, type });
|
|
28011
28018
|
}
|
|
28012
28019
|
return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
28013
28020
|
}
|
|
28014
|
-
return basic_1.VoidType.get("
|
|
28021
|
+
return basic_1.VoidType.get("SELECT_todo7");
|
|
28015
28022
|
}
|
|
28016
28023
|
static findFields(node, input) {
|
|
28017
28024
|
var _a, _b;
|
|
@@ -54851,7 +54858,7 @@ class Registry {
|
|
|
54851
54858
|
}
|
|
54852
54859
|
static abaplintVersion() {
|
|
54853
54860
|
// magic, see build script "version.sh"
|
|
54854
|
-
return "2.113.
|
|
54861
|
+
return "2.113.175";
|
|
54855
54862
|
}
|
|
54856
54863
|
getDDICReferences() {
|
|
54857
54864
|
return this.ddicReferences;
|
|
@@ -62667,6 +62674,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
62667
62674
|
return false;
|
|
62668
62675
|
}
|
|
62669
62676
|
replaceXsdBool(node, lowFile, highSyntax) {
|
|
62677
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
62678
|
+
return undefined;
|
|
62679
|
+
}
|
|
62670
62680
|
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
62671
62681
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
62672
62682
|
if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference
|
|
@@ -66230,6 +66240,7 @@ class InlineDataOldVersions extends _abap_rule_1.ABAPRule {
|
|
|
66230
66240
|
runParsed(file) {
|
|
66231
66241
|
const issues = [];
|
|
66232
66242
|
if (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02
|
|
66243
|
+
|| this.reg.getConfig().getVersion() === version_1.Version.OpenABAP
|
|
66233
66244
|
|| this.reg.getConfig().getVersion() === version_1.Version.Cloud) {
|
|
66234
66245
|
return [];
|
|
66235
66246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.175",
|
|
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.113.
|
|
41
|
+
"@abaplint/core": "^2.113.175",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|