@abaplint/transpiler-cli 2.11.93 → 2.11.94
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/bundle.js +164 -144
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -3008,7 +3008,7 @@ exports.AssociationName = void 0;
|
|
|
3008
3008
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3009
3009
|
class AssociationName extends combi_1.Expression {
|
|
3010
3010
|
getRunnable() {
|
|
3011
|
-
return (0, combi_1.regex)(
|
|
3011
|
+
return (0, combi_1.regex)(/^(\\_[\w]+)+$/);
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
exports.AssociationName = AssociationName;
|
|
@@ -8363,13 +8363,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
8363
8363
|
exports.Type = void 0;
|
|
8364
8364
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
8365
8365
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
8366
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
8366
8367
|
class Type extends combi_1.Expression {
|
|
8367
8368
|
getRunnable() {
|
|
8368
|
-
const indicators = (0, combi_1.seq)("WITH INDICATORS", _1.ComponentName, "TYPE", _1.TypeName);
|
|
8369
|
+
const indicators = (0, combi_1.seq)("WITH INDICATORS", _1.ComponentName, (0, combi_1.optPrio)((0, combi_1.seq)("TYPE", _1.TypeName)));
|
|
8369
8370
|
const typeType = (0, combi_1.seq)(_1.TypeName, (0, combi_1.optPrio)(_1.Default));
|
|
8370
8371
|
const like = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", _1.FieldChain), (0, combi_1.seq)("REF TO", _1.FieldChain), _1.FieldChain);
|
|
8371
8372
|
const type = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", typeType), (0, combi_1.seq)("REF TO", typeType), (0, combi_1.seq)(typeType, (0, combi_1.optPrio)(_1.LOBHandle)));
|
|
8372
|
-
const ret = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.seq)("LIKE", like), (0, combi_1.seq)("TYPE", type)), (0, combi_1.optPrio)(indicators));
|
|
8373
|
+
const ret = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.seq)("LIKE", like), (0, combi_1.seq)("TYPE", type)), (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v755, indicators)));
|
|
8373
8374
|
return ret;
|
|
8374
8375
|
}
|
|
8375
8376
|
}
|
|
@@ -10778,6 +10779,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
10778
10779
|
exports.CreateObject = void 0;
|
|
10779
10780
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
10780
10781
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
10782
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
10781
10783
|
class CreateObject {
|
|
10782
10784
|
getMatcher() {
|
|
10783
10785
|
const exporting = (0, combi_1.seq)("EXPORTING", expressions_1.ParameterListS);
|
|
@@ -10786,7 +10788,7 @@ class CreateObject {
|
|
|
10786
10788
|
const etable = (0, combi_1.seq)("EXCEPTION-TABLE", expressions_1.Source);
|
|
10787
10789
|
const area = (0, combi_1.seq)("AREA HANDLE", expressions_1.Source);
|
|
10788
10790
|
const type = (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(expressions_1.ClassName, expressions_1.Dynamic));
|
|
10789
|
-
const ret = (0, combi_1.seq)("CREATE OBJECT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.per)(type, area)), (0, combi_1.optPrio)((0, combi_1.altPrio)(exporting, ptable)), (0, combi_1.optPrio)((0, combi_1.altPrio)(exceptions, etable)));
|
|
10791
|
+
const ret = (0, combi_1.seq)("CREATE OBJECT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.per)(type, (0, combi_1.verNot)(version_1.Version.Cloud, area))), (0, combi_1.optPrio)((0, combi_1.altPrio)(exporting, ptable)), (0, combi_1.optPrio)((0, combi_1.altPrio)(exceptions, etable)));
|
|
10790
10792
|
return ret;
|
|
10791
10793
|
}
|
|
10792
10794
|
}
|
|
@@ -17268,12 +17270,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
17268
17270
|
exports.UpdateDatabase = void 0;
|
|
17269
17271
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
17270
17272
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
17273
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
17271
17274
|
class UpdateDatabase {
|
|
17272
17275
|
getMatcher() {
|
|
17273
17276
|
const parameters = (0, combi_1.seq)(expressions_1.SQLFieldAndValue, (0, combi_1.star)((0, combi_1.seq)((0, combi_1.opt)(","), expressions_1.SQLFieldAndValue)));
|
|
17274
17277
|
const set = (0, combi_1.seq)("SET", (0, combi_1.alt)(parameters, expressions_1.Dynamic), (0, combi_1.opt)((0, combi_1.seq)("WHERE", expressions_1.SQLCond)));
|
|
17275
17278
|
const indicators = (0, combi_1.seq)("INDICATORS SET STRUCTURE", expressions_1.ComponentName);
|
|
17276
|
-
const fromTable = (0, combi_1.seq)("FROM", (0, combi_1.opt)("TABLE"), expressions_1.SQLSource, (0, combi_1.opt)(indicators));
|
|
17279
|
+
const fromTable = (0, combi_1.seq)("FROM", (0, combi_1.opt)("TABLE"), expressions_1.SQLSource, (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v755, indicators)));
|
|
17277
17280
|
const ret = (0, combi_1.seq)("UPDATE", expressions_1.DatabaseTable, (0, combi_1.opt)(expressions_1.SQLClient), (0, combi_1.opt)(expressions_1.DatabaseConnection), (0, combi_1.opt)((0, combi_1.alt)(fromTable, set)));
|
|
17278
17281
|
return ret;
|
|
17279
17282
|
}
|
|
@@ -21815,6 +21818,15 @@ class ObjectOriented {
|
|
|
21815
21818
|
if (search) {
|
|
21816
21819
|
return search;
|
|
21817
21820
|
}
|
|
21821
|
+
for (const a of def.getAliases()) {
|
|
21822
|
+
if (a.getName().toUpperCase() === name.toUpperCase()) {
|
|
21823
|
+
const comp = a.getComponent();
|
|
21824
|
+
const res = this.searchTypeName(this.scope.findObjectDefinition(comp.split("~")[0]), comp.split("~")[1]);
|
|
21825
|
+
if (res) {
|
|
21826
|
+
return res;
|
|
21827
|
+
}
|
|
21828
|
+
}
|
|
21829
|
+
}
|
|
21818
21830
|
if (name.includes("~")) {
|
|
21819
21831
|
const interfaceName = name.split("~")[0];
|
|
21820
21832
|
if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName.toUpperCase())) {
|
|
@@ -23297,7 +23309,7 @@ class BasicTypes {
|
|
|
23297
23309
|
return this.parseType(node, name);
|
|
23298
23310
|
}
|
|
23299
23311
|
parseType(node, qualifiedName) {
|
|
23300
|
-
var _a, _b, _c, _d, _e, _f;
|
|
23312
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
23301
23313
|
const typeName = node.findFirstExpression(Expressions.TypeName);
|
|
23302
23314
|
let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
23303
23315
|
if (text === undefined) {
|
|
@@ -23435,6 +23447,17 @@ class BasicTypes {
|
|
|
23435
23447
|
}
|
|
23436
23448
|
}
|
|
23437
23449
|
}
|
|
23450
|
+
if (text.includes(" WITH INDICATORS ")) {
|
|
23451
|
+
const componentName = (_h = (_g = node.findFirstExpression(Expressions.Type)) === null || _g === void 0 ? void 0 : _g.findDirectExpression(Expressions.ComponentName)) === null || _h === void 0 ? void 0 : _h.concatTokens().toUpperCase();
|
|
23452
|
+
if (componentName === undefined) {
|
|
23453
|
+
throw new Error("parseType, componentName expected");
|
|
23454
|
+
}
|
|
23455
|
+
if (found instanceof Types.StructureType) {
|
|
23456
|
+
const newComponents = [...found.getComponents()];
|
|
23457
|
+
newComponents.push({ name: componentName, type: Types.VoidType.get("INDICATORStodo") });
|
|
23458
|
+
found = new Types.StructureType(newComponents, qualifiedName);
|
|
23459
|
+
}
|
|
23460
|
+
}
|
|
23438
23461
|
return found;
|
|
23439
23462
|
}
|
|
23440
23463
|
/////////////////////
|
|
@@ -24837,8 +24860,10 @@ class FieldChain {
|
|
|
24837
24860
|
}
|
|
24838
24861
|
else if (current.get() instanceof tokens_1.Dash) {
|
|
24839
24862
|
if (context instanceof basic_1.UnknownType) {
|
|
24863
|
+
/*
|
|
24840
24864
|
const message = "Not a structure, type unknown, FieldChain";
|
|
24841
|
-
input.issues.push(
|
|
24865
|
+
input.issues.push(syntaxIssue(input, current.getFirstToken(), message));
|
|
24866
|
+
*/
|
|
24842
24867
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
24843
24868
|
}
|
|
24844
24869
|
else if (!(context instanceof basic_1.StructureType)
|
|
@@ -24895,13 +24920,13 @@ class FieldChain {
|
|
|
24895
24920
|
}
|
|
24896
24921
|
else if (current instanceof nodes_1.ExpressionNode
|
|
24897
24922
|
&& current.get() instanceof Expressions.TableExpression) {
|
|
24898
|
-
if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType)) {
|
|
24923
|
+
if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType) && !(context instanceof basic_1.UnknownType)) {
|
|
24899
24924
|
const message = "Table expression, expected table";
|
|
24900
24925
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
|
|
24901
24926
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
24902
24927
|
}
|
|
24903
24928
|
table_expression_1.TableExpression.runSyntax(current, input, context);
|
|
24904
|
-
if (!(context instanceof basic_1.VoidType)) {
|
|
24929
|
+
if (!(context instanceof basic_1.VoidType) && !(context instanceof basic_1.UnknownType)) {
|
|
24905
24930
|
context = context.getRowType();
|
|
24906
24931
|
}
|
|
24907
24932
|
}
|
|
@@ -26737,9 +26762,13 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
26737
26762
|
const isSimple = /^\w+$/;
|
|
26738
26763
|
class Select {
|
|
26739
26764
|
static runSyntax(node, input, skipImplicitInto = false) {
|
|
26740
|
-
var _a;
|
|
26765
|
+
var _a, _b;
|
|
26741
26766
|
const token = node.getFirstToken();
|
|
26742
|
-
|
|
26767
|
+
let from = node.findDirectExpression(Expressions.SQLFrom);
|
|
26768
|
+
if (from === undefined) {
|
|
26769
|
+
// huh, sometimes the select expression is wrapped
|
|
26770
|
+
from = node.findFirstExpression(Expressions.SQLFrom);
|
|
26771
|
+
}
|
|
26743
26772
|
const dbSources = from ? sql_from_1.SQLFrom.runSyntax(from, input) : [];
|
|
26744
26773
|
if (from === undefined) {
|
|
26745
26774
|
const message = `Missing FROM`;
|
|
@@ -26754,7 +26783,7 @@ class Select {
|
|
|
26754
26783
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
26755
26784
|
return;
|
|
26756
26785
|
}
|
|
26757
|
-
const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE"
|
|
26786
|
+
const isSingle = ((_a = node.getChildren()[1]) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "SINGLE"
|
|
26758
26787
|
|| node.get() instanceof Expressions.SelectLoop;
|
|
26759
26788
|
this.checkFields(fields, dbSources, input, node);
|
|
26760
26789
|
this.handleInto(node, input, fields, dbSources, isSingle);
|
|
@@ -26771,7 +26800,7 @@ class Select {
|
|
|
26771
26800
|
&& node.findDirectExpression(Expressions.SQLIntoTable) === undefined
|
|
26772
26801
|
&& node.findDirectExpression(Expressions.SQLIntoList) === undefined
|
|
26773
26802
|
&& node.findDirectExpression(Expressions.SQLIntoStructure) === undefined) {
|
|
26774
|
-
const fields = (
|
|
26803
|
+
const fields = (_b = node.findFirstExpression(Expressions.SQLAggregation)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
26775
26804
|
const c = new RegExp(/^count\(\s*\*\s*\)$/, "i");
|
|
26776
26805
|
if (fields === undefined || c.test(fields) === false) {
|
|
26777
26806
|
const nameToken = from === null || from === void 0 ? void 0 : from.findDirectExpression(Expressions.SQLFromSource);
|
|
@@ -28033,13 +28062,13 @@ class Target {
|
|
|
28033
28062
|
}
|
|
28034
28063
|
else if (current instanceof nodes_1.ExpressionNode
|
|
28035
28064
|
&& current.get() instanceof Expressions.TableExpression) {
|
|
28036
|
-
if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType)) {
|
|
28065
|
+
if (!(context instanceof basic_1.TableType) && !(context instanceof basic_1.VoidType) && !(context instanceof unknown_type_1.UnknownType)) {
|
|
28037
28066
|
const message = "Table expression, expected table";
|
|
28038
28067
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28039
28068
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28040
28069
|
}
|
|
28041
28070
|
table_expression_1.TableExpression.runSyntax(current, input, context);
|
|
28042
|
-
if (!(context instanceof basic_1.VoidType)) {
|
|
28071
|
+
if (!(context instanceof basic_1.VoidType) && !(context instanceof unknown_type_1.UnknownType)) {
|
|
28043
28072
|
context = context.getRowType();
|
|
28044
28073
|
}
|
|
28045
28074
|
}
|
|
@@ -28863,8 +28892,8 @@ class Append {
|
|
|
28863
28892
|
}
|
|
28864
28893
|
const fsTarget = node.findExpressionAfterToken("ASSIGNING");
|
|
28865
28894
|
if (fsTarget && fsTarget.get() instanceof Expressions.FSTarget) {
|
|
28866
|
-
if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType)) {
|
|
28867
|
-
const message = "APPEND to non table type";
|
|
28895
|
+
if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType) && !(targetType instanceof basic_1.UnknownType)) {
|
|
28896
|
+
const message = "APPEND to non table type, " + (targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name);
|
|
28868
28897
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28869
28898
|
return;
|
|
28870
28899
|
}
|
|
@@ -28873,8 +28902,8 @@ class Append {
|
|
|
28873
28902
|
}
|
|
28874
28903
|
const dataTarget = node.findExpressionAfterToken("INTO");
|
|
28875
28904
|
if (dataTarget && node.concatTokens().toUpperCase().includes(" REFERENCE INTO DATA(")) {
|
|
28876
|
-
if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType)) {
|
|
28877
|
-
const message = "APPEND to non table type";
|
|
28905
|
+
if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType) && !(targetType instanceof basic_1.UnknownType)) {
|
|
28906
|
+
const message = "APPEND to non table type, " + (targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name);
|
|
28878
28907
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28879
28908
|
return;
|
|
28880
28909
|
}
|
|
@@ -31605,9 +31634,10 @@ const component_cond_1 = __webpack_require__(/*! ../expressions/component_cond *
|
|
|
31605
31634
|
const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js");
|
|
31606
31635
|
const loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/loop_group_by.js");
|
|
31607
31636
|
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
31637
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
31608
31638
|
class Loop {
|
|
31609
31639
|
runSyntax(node, input) {
|
|
31610
|
-
var _a;
|
|
31640
|
+
var _a, _b;
|
|
31611
31641
|
const loopTarget = node.findDirectExpression(Expressions.LoopTarget);
|
|
31612
31642
|
let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);
|
|
31613
31643
|
const targetType = target ? target_1.Target.runSyntax(target, input) : undefined;
|
|
@@ -31657,6 +31687,7 @@ class Loop {
|
|
|
31657
31687
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31658
31688
|
}
|
|
31659
31689
|
const targetConcat = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.concatTokens().toUpperCase();
|
|
31690
|
+
const topType = sourceType; // todo: refactor topType vs sourceType vs rowType
|
|
31660
31691
|
if (sourceType instanceof basic_1.TableType) {
|
|
31661
31692
|
rowType = sourceType.getRowType();
|
|
31662
31693
|
sourceType = rowType;
|
|
@@ -31664,6 +31695,10 @@ class Loop {
|
|
|
31664
31695
|
sourceType = new basic_1.DataReference(sourceType);
|
|
31665
31696
|
}
|
|
31666
31697
|
}
|
|
31698
|
+
const cond = node.findDirectExpression(Expressions.ComponentCond);
|
|
31699
|
+
if (cond !== undefined) {
|
|
31700
|
+
component_cond_1.ComponentCond.runSyntax(cond, input, rowType);
|
|
31701
|
+
}
|
|
31667
31702
|
if (targetConcat
|
|
31668
31703
|
&& targetConcat.startsWith("TRANSPORTING ")
|
|
31669
31704
|
&& node.findDirectTokenByText("WHERE") === undefined) {
|
|
@@ -31671,6 +31706,32 @@ class Loop {
|
|
|
31671
31706
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31672
31707
|
return;
|
|
31673
31708
|
}
|
|
31709
|
+
if (node.findDirectTokenByText("USING") !== undefined
|
|
31710
|
+
&& cond !== undefined
|
|
31711
|
+
&& topType instanceof basic_1.TableType) {
|
|
31712
|
+
// https://github.com/abap2xlsx/abap2xlsx/issues/1341
|
|
31713
|
+
const keyName = node.findExpressionAfterToken("KEY");
|
|
31714
|
+
let key = undefined;
|
|
31715
|
+
if ((keyName === null || keyName === void 0 ? void 0 : keyName.get()) instanceof Expressions.SimpleName) {
|
|
31716
|
+
// it might be dynamic, in that case we cannot check anything
|
|
31717
|
+
key = (_b = topType.getOptions().secondary) === null || _b === void 0 ? void 0 : _b.find(k => k.name.toUpperCase() === keyName.getFirstToken().getStr().toUpperCase());
|
|
31718
|
+
if (key === undefined) {
|
|
31719
|
+
const message = "Key " + (keyName === null || keyName === void 0 ? void 0 : keyName.concatTokens()) + " not found in table type";
|
|
31720
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31721
|
+
return;
|
|
31722
|
+
}
|
|
31723
|
+
if (input.scope.getRegistry().getConfig().getVersion() <= version_1.Version.v740sp02) {
|
|
31724
|
+
const compares = cond.findAllExpressionsRecursive(Expressions.ComponentCompare).map(c => c.concatTokens().toUpperCase());
|
|
31725
|
+
for (const keyField of key.keyFields) {
|
|
31726
|
+
if (compares.find(c => c === keyField.toUpperCase() + " IS INITIAL") !== undefined) {
|
|
31727
|
+
const message = "Loop, key check with IS INITIAL cannot optimized before 7.40 SP02";
|
|
31728
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31729
|
+
return;
|
|
31730
|
+
}
|
|
31731
|
+
}
|
|
31732
|
+
}
|
|
31733
|
+
}
|
|
31734
|
+
}
|
|
31674
31735
|
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
31675
31736
|
if (inline) {
|
|
31676
31737
|
inline_data_1.InlineData.runSyntax(inline, input, sourceType);
|
|
@@ -31691,9 +31752,6 @@ class Loop {
|
|
|
31691
31752
|
fstarget_1.FSTarget.runSyntax(fstarget, input, sourceType);
|
|
31692
31753
|
}
|
|
31693
31754
|
}
|
|
31694
|
-
for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {
|
|
31695
|
-
component_cond_1.ComponentCond.runSyntax(t, input, rowType);
|
|
31696
|
-
}
|
|
31697
31755
|
for (const t of node.findDirectExpressions(Expressions.Dynamic)) {
|
|
31698
31756
|
dynamic_1.Dynamic.runSyntax(t, input);
|
|
31699
31757
|
}
|
|
@@ -39321,12 +39379,13 @@ class MethodParameters {
|
|
|
39321
39379
|
const concat = node.concatTokens().toUpperCase();
|
|
39322
39380
|
if (concat.includes(" FOR VALIDATE ")
|
|
39323
39381
|
|| concat.includes(" FOR BEHAVIOR ")
|
|
39382
|
+
|| concat.includes(" FOR DETERMINE ")
|
|
39324
39383
|
|| concat.includes(" FOR FEATURES ")
|
|
39325
39384
|
|| concat.includes(" FOR INSTANCE FEATURES ")
|
|
39385
|
+
|| concat.includes(" FOR LOCK ")
|
|
39386
|
+
|| concat.includes(" FOR NUMBERING ")
|
|
39326
39387
|
|| concat.includes(" FOR READ ")
|
|
39327
39388
|
|| concat.includes(" FOR VALIDATION ")
|
|
39328
|
-
|| concat.includes(" FOR DETERMINE ")
|
|
39329
|
-
|| concat.includes(" FOR LOCK ")
|
|
39330
39389
|
|| concat.includes(" FOR MODIFY ")) {
|
|
39331
39390
|
const token = isRap.getFirstToken();
|
|
39332
39391
|
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), input.filename, basic_1.VoidType.get("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
@@ -39549,7 +39608,7 @@ class CDSDetermineTypes {
|
|
|
39549
39608
|
}
|
|
39550
39609
|
components.push({
|
|
39551
39610
|
name: f.name,
|
|
39552
|
-
type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
|
|
39611
|
+
type: new basic_1.UnknownType("CDS parser error, unknown source, " + f.name + ", " + ddlsName),
|
|
39553
39612
|
});
|
|
39554
39613
|
continue;
|
|
39555
39614
|
}
|
|
@@ -39843,7 +39902,7 @@ class CDSAggregate extends combi_1.Expression {
|
|
|
39843
39902
|
getRunnable() {
|
|
39844
39903
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName)));
|
|
39845
39904
|
const value = (0, combi_1.alt)(name, "*", _1.CDSCast, _1.CDSCase, _1.CDSFunction);
|
|
39846
|
-
return (0, combi_1.seq)((0, combi_1.
|
|
39905
|
+
return (0, combi_1.seq)((0, combi_1.altPrio)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
|
|
39847
39906
|
}
|
|
39848
39907
|
}
|
|
39849
39908
|
exports.CDSAggregate = CDSAggregate;
|
|
@@ -39913,7 +39972,7 @@ const cds_annotation_simple_1 = __webpack_require__(/*! ./cds_annotation_simple
|
|
|
39913
39972
|
class CDSAnnotationArray extends combi_1.Expression {
|
|
39914
39973
|
getRunnable() {
|
|
39915
39974
|
const value = (0, combi_1.alt)(cds_annotation_simple_1.CDSAnnotationSimple, _1.CDSAnnotationObject, CDSAnnotationArray);
|
|
39916
|
-
const valueList = (0, combi_1.seq)("[", value, (0, combi_1.
|
|
39975
|
+
const valueList = (0, combi_1.seq)("[", value, (0, combi_1.starPrio)((0, combi_1.seq)(",", value)), "]");
|
|
39917
39976
|
return valueList;
|
|
39918
39977
|
}
|
|
39919
39978
|
}
|
|
@@ -40084,8 +40143,8 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
40084
40143
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
40085
40144
|
class CDSCase extends combi_1.Expression {
|
|
40086
40145
|
getRunnable() {
|
|
40087
|
-
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.
|
|
40088
|
-
const value = (0, combi_1.altPrio)(_1.
|
|
40146
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName)));
|
|
40147
|
+
const value = (0, combi_1.altPrio)(_1.CDSString, CDSCase, _1.CDSCast, _1.CDSArithmetics, _1.CDSFunction, name);
|
|
40089
40148
|
const thenValue = (0, combi_1.altPrio)((0, combi_1.seq)("(", value, ")"), value);
|
|
40090
40149
|
const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSFunction, name), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", thenValue)));
|
|
40091
40150
|
const complex = (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", thenValue));
|
|
@@ -40111,7 +40170,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
40111
40170
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
40112
40171
|
class CDSCast extends combi_1.Expression {
|
|
40113
40172
|
getRunnable() {
|
|
40114
|
-
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.
|
|
40173
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName)));
|
|
40115
40174
|
return (0, combi_1.seq)("CAST", "(", (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSCase, _1.CDSAggregate, _1.CDSArithmetics, CDSCast, _1.CDSString, name), "AS", _1.CDSType, (0, combi_1.optPrio)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
|
|
40116
40175
|
}
|
|
40117
40176
|
}
|
|
@@ -40158,7 +40217,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
|
|
|
40158
40217
|
const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js");
|
|
40159
40218
|
class CDSCondition extends combi_1.Expression {
|
|
40160
40219
|
getRunnable() {
|
|
40161
|
-
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.
|
|
40220
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
|
|
40162
40221
|
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, _1.CDSAggregate, name);
|
|
40163
40222
|
const operators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">", "LIKE", "NOT LIKE");
|
|
40164
40223
|
const compare = (0, combi_1.seq)(operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
|
|
@@ -40216,7 +40275,7 @@ class CDSDefineCustom extends combi_1.Expression {
|
|
|
40216
40275
|
getRunnable() {
|
|
40217
40276
|
const field = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";");
|
|
40218
40277
|
const compsiOrAssoci = (0, combi_1.seq)(cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
|
|
40219
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), (0, combi_1.opt)(_1.CDSWithParameters),
|
|
40278
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
40220
40279
|
}
|
|
40221
40280
|
}
|
|
40222
40281
|
exports.CDSDefineCustom = CDSDefineCustom;
|
|
@@ -40313,9 +40372,9 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "./node_modules/@abaplint/c
|
|
|
40313
40372
|
const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js");
|
|
40314
40373
|
class CDSElement extends combi_1.Expression {
|
|
40315
40374
|
getRunnable() {
|
|
40316
|
-
const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.
|
|
40317
|
-
const colonThing = (0, combi_1.seq)(":", _1.CDSName);
|
|
40318
|
-
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.
|
|
40375
|
+
const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
|
|
40376
|
+
const colonThing = (0, combi_1.seq)(":", (0, combi_1.alt)(_1.CDSName, _1.CDSType, "LOCALIZED"));
|
|
40377
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.altPrio)("KEY", "VIRTUAL")), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.optPrio)(cds_as_1.CDSAs), (0, combi_1.optPrio)((0, combi_1.altPrio)(redirected, colonThing))), _1.CDSInteger), (0, combi_1.optPrio)(cds_as_1.CDSAs));
|
|
40319
40378
|
}
|
|
40320
40379
|
}
|
|
40321
40380
|
exports.CDSElement = CDSElement;
|
|
@@ -40520,7 +40579,7 @@ class CDSJoin extends combi_1.Expression {
|
|
|
40520
40579
|
getRunnable() {
|
|
40521
40580
|
const cond = (0, combi_1.seq)(_1.CDSSource, "ON", cds_condition_1.CDSCondition);
|
|
40522
40581
|
const foo = (0, combi_1.altPrio)((0, combi_1.seq)("(", cond, ")"), cond);
|
|
40523
|
-
return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER")), "JOIN", foo);
|
|
40582
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER", "CROSS")), "JOIN", foo);
|
|
40524
40583
|
}
|
|
40525
40584
|
}
|
|
40526
40585
|
exports.CDSJoin = CDSJoin;
|
|
@@ -46926,7 +46985,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
46926
46985
|
return undefined;
|
|
46927
46986
|
}
|
|
46928
46987
|
findFieldNames(tree) {
|
|
46929
|
-
var _a, _b;
|
|
46988
|
+
var _a, _b, _c;
|
|
46930
46989
|
let expr = tree.findFirstExpression(expressions_1.CDSSelect);
|
|
46931
46990
|
if (expr === undefined) {
|
|
46932
46991
|
expr = tree.findFirstExpression(expressions_1.CDSAnnotate);
|
|
@@ -46938,14 +46997,16 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
46938
46997
|
let prefix = "";
|
|
46939
46998
|
let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
|
|
46940
46999
|
if (found === undefined) {
|
|
46941
|
-
const list = e.findAllExpressions(expressions_1.CDSName);
|
|
46942
|
-
if (
|
|
46943
|
-
|
|
46944
|
-
|
|
46945
|
-
|
|
46946
|
-
|
|
46947
|
-
|
|
46948
|
-
|
|
47000
|
+
const list = (_b = e.findDirectExpression(expressions_1.CDSPrefixedName)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(expressions_1.CDSName);
|
|
47001
|
+
if (list) {
|
|
47002
|
+
if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
|
|
47003
|
+
found = list[0];
|
|
47004
|
+
}
|
|
47005
|
+
else {
|
|
47006
|
+
found = list[list.length - 1];
|
|
47007
|
+
if (list.length > 1) {
|
|
47008
|
+
prefix = list[0].concatTokens();
|
|
47009
|
+
}
|
|
46949
47010
|
}
|
|
46950
47011
|
}
|
|
46951
47012
|
}
|
|
@@ -46953,7 +47014,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
46953
47014
|
continue;
|
|
46954
47015
|
}
|
|
46955
47016
|
const name = found === null || found === void 0 ? void 0 : found.concatTokens();
|
|
46956
|
-
if ((
|
|
47017
|
+
if ((_c = this.parsedData) === null || _c === void 0 ? void 0 : _c.associations.some(a => { var _a; return a.name.toUpperCase() === name.toUpperCase() || ((_a = a.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === name.toUpperCase(); })) {
|
|
46957
47018
|
continue;
|
|
46958
47019
|
}
|
|
46959
47020
|
const annotations = [];
|
|
@@ -53389,7 +53450,7 @@ class Registry {
|
|
|
53389
53450
|
}
|
|
53390
53451
|
static abaplintVersion() {
|
|
53391
53452
|
// magic, see build script "version.sh"
|
|
53392
|
-
return "2.113.
|
|
53453
|
+
return "2.113.217";
|
|
53393
53454
|
}
|
|
53394
53455
|
getDDICReferences() {
|
|
53395
53456
|
return this.ddicReferences;
|
|
@@ -77609,40 +77670,42 @@ exports.PopulateTables = PopulateTables;
|
|
|
77609
77670
|
|
|
77610
77671
|
/***/ }),
|
|
77611
77672
|
|
|
77612
|
-
/***/ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/
|
|
77613
|
-
|
|
77614
|
-
!*** ./node_modules/@abaplint/transpiler/build/src/db/schema_generation/
|
|
77615
|
-
|
|
77616
|
-
/***/ ((__unused_webpack_module, exports
|
|
77673
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/_database_schema_reuse.js":
|
|
77674
|
+
/*!****************************************************************************************************!*\
|
|
77675
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/db/schema_generation/_database_schema_reuse.js ***!
|
|
77676
|
+
\****************************************************************************************************/
|
|
77677
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
77617
77678
|
|
|
77618
77679
|
"use strict";
|
|
77619
77680
|
|
|
77620
77681
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
77621
|
-
exports.
|
|
77622
|
-
|
|
77623
|
-
|
|
77624
|
-
|
|
77625
|
-
|
|
77626
|
-
|
|
77682
|
+
exports.DatabaseSchemaReuse = void 0;
|
|
77683
|
+
class DatabaseSchemaReuse {
|
|
77684
|
+
myQuote;
|
|
77685
|
+
constructor(quote) {
|
|
77686
|
+
this.myQuote = quote;
|
|
77687
|
+
}
|
|
77688
|
+
quote(name) {
|
|
77689
|
+
return this.myQuote + name.toLowerCase() + this.myQuote;
|
|
77627
77690
|
}
|
|
77628
77691
|
buildVIEW(view) {
|
|
77629
77692
|
const fields = view.getFields();
|
|
77630
77693
|
let firstTabname = "";
|
|
77631
77694
|
const columns = fields?.map((f) => {
|
|
77632
|
-
firstTabname =
|
|
77695
|
+
firstTabname = this.quote(f.TABNAME.toLowerCase());
|
|
77633
77696
|
return firstTabname + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase();
|
|
77634
77697
|
}).join(", ");
|
|
77635
77698
|
let from = "";
|
|
77636
77699
|
let previous = "";
|
|
77637
77700
|
for (const j of view.getJoin() || []) {
|
|
77638
77701
|
if (previous === "") {
|
|
77639
|
-
from +=
|
|
77702
|
+
from += this.quote(j.LTAB.toLowerCase()) + " INNER JOIN " + this.quote(j.RTAB.toLowerCase()) + " ON " + this.quote(j.LTAB.toLowerCase()) + "." + j.LFIELD.toLowerCase() + " = " + this.quote(j.RTAB.toLowerCase()) + "." + j.RFIELD.toLowerCase();
|
|
77640
77703
|
}
|
|
77641
77704
|
else if (previous === j.LTAB + "," + j.RTAB) {
|
|
77642
|
-
from += " AND
|
|
77705
|
+
from += " AND " + this.quote(j.LTAB.toLowerCase()) + "." + j.LFIELD.toLowerCase() + " = " + this.quote(j.RTAB.toLowerCase()) + "." + j.RFIELD.toLowerCase();
|
|
77643
77706
|
}
|
|
77644
77707
|
else {
|
|
77645
|
-
from += " INNER JOIN
|
|
77708
|
+
from += " INNER JOIN " + this.quote(j.RTAB.toLowerCase()) + " ON " + this.quote(j.LTAB.toLowerCase()) + "." + j.LFIELD.toLowerCase() + " = " + this.quote(j.RTAB.toLowerCase()) + "." + j.RFIELD.toLowerCase();
|
|
77646
77709
|
}
|
|
77647
77710
|
previous = j.LTAB + "," + j.RTAB;
|
|
77648
77711
|
}
|
|
@@ -77650,7 +77713,34 @@ class PGDatabaseSchema {
|
|
|
77650
77713
|
if (from === "") {
|
|
77651
77714
|
from = firstTabname;
|
|
77652
77715
|
}
|
|
77653
|
-
return `CREATE VIEW
|
|
77716
|
+
return `CREATE VIEW ${this.quote(view.getName().toLowerCase())} AS SELECT ${columns} FROM ${from};\n`;
|
|
77717
|
+
}
|
|
77718
|
+
}
|
|
77719
|
+
exports.DatabaseSchemaReuse = DatabaseSchemaReuse;
|
|
77720
|
+
//# sourceMappingURL=_database_schema_reuse.js.map
|
|
77721
|
+
|
|
77722
|
+
/***/ }),
|
|
77723
|
+
|
|
77724
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/pg_database_schema.js":
|
|
77725
|
+
/*!************************************************************************************************!*\
|
|
77726
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/db/schema_generation/pg_database_schema.js ***!
|
|
77727
|
+
\************************************************************************************************/
|
|
77728
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
77729
|
+
|
|
77730
|
+
"use strict";
|
|
77731
|
+
|
|
77732
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
77733
|
+
exports.PGDatabaseSchema = void 0;
|
|
77734
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
77735
|
+
const _database_schema_reuse_1 = __webpack_require__(/*! ./_database_schema_reuse */ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/_database_schema_reuse.js");
|
|
77736
|
+
const QUOTE = "\"";
|
|
77737
|
+
class PGDatabaseSchema {
|
|
77738
|
+
reg;
|
|
77739
|
+
constructor(reg) {
|
|
77740
|
+
this.reg = reg;
|
|
77741
|
+
}
|
|
77742
|
+
buildVIEW(view) {
|
|
77743
|
+
return new _database_schema_reuse_1.DatabaseSchemaReuse(QUOTE).buildVIEW(view);
|
|
77654
77744
|
}
|
|
77655
77745
|
buildTABL(tabl) {
|
|
77656
77746
|
const type = tabl.parseType(this.reg);
|
|
@@ -77737,32 +77827,8 @@ class SnowflakeDatabaseSchema {
|
|
|
77737
77827
|
constructor(reg) {
|
|
77738
77828
|
this.reg = reg;
|
|
77739
77829
|
}
|
|
77740
|
-
buildVIEW(
|
|
77741
|
-
|
|
77742
|
-
let firstTabname = "";
|
|
77743
|
-
const columns = fields?.map((f) => {
|
|
77744
|
-
firstTabname = "'" + f.TABNAME.toLowerCase() + "'";
|
|
77745
|
-
return firstTabname + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase();
|
|
77746
|
-
}).join(", ");
|
|
77747
|
-
let from = "";
|
|
77748
|
-
let previous = "";
|
|
77749
|
-
for (const j of view.getJoin() || []) {
|
|
77750
|
-
if (previous === "") {
|
|
77751
|
-
from += "'" + j.LTAB.toLowerCase() + "' INNER JOIN '" + j.RTAB.toLowerCase() + "' ON '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
77752
|
-
}
|
|
77753
|
-
else if (previous === j.LTAB + "," + j.RTAB) {
|
|
77754
|
-
from += " AND '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
77755
|
-
}
|
|
77756
|
-
else {
|
|
77757
|
-
from += " INNER JOIN '" + j.RTAB.toLowerCase() + "' ON '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
77758
|
-
}
|
|
77759
|
-
previous = j.LTAB + "," + j.RTAB;
|
|
77760
|
-
}
|
|
77761
|
-
from = from.trim();
|
|
77762
|
-
if (from === "") {
|
|
77763
|
-
from = firstTabname;
|
|
77764
|
-
}
|
|
77765
|
-
return `CREATE VIEW '${view.getName().toLowerCase()}' AS SELECT ${columns} FROM ${from};\n`;
|
|
77830
|
+
buildVIEW(_view) {
|
|
77831
|
+
throw new Error("buildView, todo snowflake");
|
|
77766
77832
|
}
|
|
77767
77833
|
buildTABL(tabl) {
|
|
77768
77834
|
const type = tabl.parseType(this.reg);
|
|
@@ -77845,6 +77911,8 @@ exports.SnowflakeDatabaseSchema = SnowflakeDatabaseSchema;
|
|
|
77845
77911
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
77846
77912
|
exports.SQLiteDatabaseSchema = void 0;
|
|
77847
77913
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
77914
|
+
const _database_schema_reuse_1 = __webpack_require__(/*! ./_database_schema_reuse */ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/_database_schema_reuse.js");
|
|
77915
|
+
const QUOTE = "'";
|
|
77848
77916
|
class SQLiteDatabaseSchema {
|
|
77849
77917
|
reg;
|
|
77850
77918
|
constructor(reg) {
|
|
@@ -77852,31 +77920,7 @@ class SQLiteDatabaseSchema {
|
|
|
77852
77920
|
}
|
|
77853
77921
|
// https://www.sqlite.org/lang_createview.html
|
|
77854
77922
|
buildVIEW(view) {
|
|
77855
|
-
|
|
77856
|
-
let firstTabname = "";
|
|
77857
|
-
const columns = fields?.map((f) => {
|
|
77858
|
-
firstTabname = "'" + f.TABNAME.toLowerCase() + "'";
|
|
77859
|
-
return firstTabname + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase();
|
|
77860
|
-
}).join(", ");
|
|
77861
|
-
let from = "";
|
|
77862
|
-
let previous = "";
|
|
77863
|
-
for (const j of view.getJoin() || []) {
|
|
77864
|
-
if (previous === "") {
|
|
77865
|
-
from += "'" + j.LTAB.toLowerCase() + "' INNER JOIN '" + j.RTAB.toLowerCase() + "' ON '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
77866
|
-
}
|
|
77867
|
-
else if (previous === j.LTAB + "," + j.RTAB) {
|
|
77868
|
-
from += " AND '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
77869
|
-
}
|
|
77870
|
-
else {
|
|
77871
|
-
from += " INNER JOIN '" + j.RTAB.toLowerCase() + "' ON '" + j.LTAB.toLowerCase() + "'." + j.LFIELD.toLowerCase() + " = '" + j.RTAB.toLowerCase() + "'." + j.RFIELD.toLowerCase();
|
|
77872
|
-
}
|
|
77873
|
-
previous = j.LTAB + "," + j.RTAB;
|
|
77874
|
-
}
|
|
77875
|
-
from = from.trim();
|
|
77876
|
-
if (from === "") {
|
|
77877
|
-
from = firstTabname;
|
|
77878
|
-
}
|
|
77879
|
-
return `CREATE VIEW '${view.getName().toLowerCase()}' AS SELECT ${columns} FROM ${from};\n`;
|
|
77923
|
+
return new _database_schema_reuse_1.DatabaseSchemaReuse(QUOTE).buildVIEW(view);
|
|
77880
77924
|
}
|
|
77881
77925
|
buildTABL(tabl) {
|
|
77882
77926
|
const type = tabl.parseType(this.reg);
|
|
@@ -79095,7 +79139,6 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/bui
|
|
|
79095
79139
|
const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
|
|
79096
79140
|
const field_symbol_1 = __webpack_require__(/*! ./field_symbol */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js");
|
|
79097
79141
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79098
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
79099
79142
|
class FieldChainTranspiler {
|
|
79100
79143
|
addGet;
|
|
79101
79144
|
addGetOffset;
|
|
@@ -79136,8 +79179,7 @@ class FieldChainTranspiler {
|
|
|
79136
79179
|
// Do not mark constants as private JS fields. Constants are exposed on instances via constructor copying.
|
|
79137
79180
|
const constants = cdef?.getAttributes().getConstants() || [];
|
|
79138
79181
|
const isConstant = constants.some(cons => cons.getName().toUpperCase() === tokenName.toUpperCase());
|
|
79139
|
-
if (
|
|
79140
|
-
&& attr?.getVisibility() === abaplint.Visibility.Private
|
|
79182
|
+
if (attr?.getVisibility() === abaplint.Visibility.Private
|
|
79141
79183
|
&& isConstant === false) {
|
|
79142
79184
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
79143
79185
|
if (id?.stype === abaplint.ScopeType.ClassImplementation
|
|
@@ -81737,7 +81779,6 @@ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abap
|
|
|
81737
81779
|
const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
|
|
81738
81780
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
81739
81781
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81740
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
81741
81782
|
class TargetTranspiler {
|
|
81742
81783
|
transpile(node, traversal) {
|
|
81743
81784
|
const offset = [];
|
|
@@ -81783,8 +81824,7 @@ class TargetTranspiler {
|
|
|
81783
81824
|
if (context instanceof abaplint.BasicTypes.ObjectReferenceType) {
|
|
81784
81825
|
const cdef = traversal.findClassDefinition(context.getIdentifierName(), scope);
|
|
81785
81826
|
const attr = cdef?.getAttributes().findByName(c.getFirstToken().getStr());
|
|
81786
|
-
if (
|
|
81787
|
-
&& attr?.getVisibility() === abaplint.Visibility.Private) {
|
|
81827
|
+
if (attr?.getVisibility() === abaplint.Visibility.Private) {
|
|
81788
81828
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
81789
81829
|
if (id?.stype === abaplint.ScopeType.ClassImplementation
|
|
81790
81830
|
&& cdef?.getName().toUpperCase() === id.sname.toUpperCase()) {
|
|
@@ -82096,23 +82136,6 @@ exports.ValueBodyLineTranspiler = ValueBodyLineTranspiler;
|
|
|
82096
82136
|
|
|
82097
82137
|
/***/ }),
|
|
82098
82138
|
|
|
82099
|
-
/***/ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js":
|
|
82100
|
-
/*!**********************************************************************!*\
|
|
82101
|
-
!*** ./node_modules/@abaplint/transpiler/build/src/feature_flags.js ***!
|
|
82102
|
-
\**********************************************************************/
|
|
82103
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
82104
|
-
|
|
82105
|
-
"use strict";
|
|
82106
|
-
|
|
82107
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
82108
|
-
exports.FEATURE_FLAGS = void 0;
|
|
82109
|
-
exports.FEATURE_FLAGS = {
|
|
82110
|
-
PRIVATE_ATTRIBUTES: true,
|
|
82111
|
-
};
|
|
82112
|
-
//# sourceMappingURL=feature_flags.js.map
|
|
82113
|
-
|
|
82114
|
-
/***/ }),
|
|
82115
|
-
|
|
82116
82139
|
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js":
|
|
82117
82140
|
/*!*****************************************************************************!*\
|
|
82118
82141
|
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js ***!
|
|
@@ -89861,7 +89884,6 @@ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abap
|
|
|
89861
89884
|
const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
|
|
89862
89885
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
89863
89886
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
89864
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
89865
89887
|
class ClassImplementationTranspiler {
|
|
89866
89888
|
transpile(node, traversal) {
|
|
89867
89889
|
const ret = new chunk_1.Chunk();
|
|
@@ -89931,7 +89953,7 @@ class ClassImplementationTranspiler {
|
|
|
89931
89953
|
return ret;
|
|
89932
89954
|
}
|
|
89933
89955
|
buildPrivate(node, traversal) {
|
|
89934
|
-
if (node === undefined
|
|
89956
|
+
if (node === undefined) {
|
|
89935
89957
|
return "";
|
|
89936
89958
|
}
|
|
89937
89959
|
const cdef = traversal.getClassDefinition(node.getFirstToken());
|
|
@@ -91060,7 +91082,6 @@ const transpile_types_1 = __webpack_require__(/*! ./transpile_types */ "./node_m
|
|
|
91060
91082
|
const chunk_1 = __webpack_require__(/*! ./chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
91061
91083
|
const expressions_1 = __webpack_require__(/*! ./expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
91062
91084
|
const keywords_1 = __webpack_require__(/*! ./keywords */ "./node_modules/@abaplint/transpiler/build/src/keywords.js");
|
|
91063
|
-
const feature_flags_1 = __webpack_require__(/*! ./feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
91064
91085
|
class Traversal {
|
|
91065
91086
|
spaghetti;
|
|
91066
91087
|
file;
|
|
@@ -91238,7 +91259,7 @@ class Traversal {
|
|
|
91238
91259
|
}
|
|
91239
91260
|
else if (this.isClassAttribute(t)) {
|
|
91240
91261
|
let escaped = Traversal.escapeNamespace(name);
|
|
91241
|
-
if (
|
|
91262
|
+
if (this.isPrivateAttribute(t)) {
|
|
91242
91263
|
escaped = "#" + escaped;
|
|
91243
91264
|
}
|
|
91244
91265
|
name = "this." + escaped;
|
|
@@ -91495,8 +91516,7 @@ class Traversal {
|
|
|
91495
91516
|
ret += "this." + escaped + " = " + cName + "." + escaped + ";\n";
|
|
91496
91517
|
}
|
|
91497
91518
|
else {
|
|
91498
|
-
if (
|
|
91499
|
-
&& a.getVisibility() === abaplint.Visibility.Private) {
|
|
91519
|
+
if (a.getVisibility() === abaplint.Visibility.Private) {
|
|
91500
91520
|
escaped = "#" + escaped;
|
|
91501
91521
|
}
|
|
91502
91522
|
const name = "this." + escaped;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.94",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.113.
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
30
|
+
"@abaplint/core": "^2.113.217",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.94",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.5.2",
|
|
34
34
|
"@types/progress": "^2.0.7",
|