@abaplint/transpiler-cli 2.7.95 → 2.7.97
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 +274 -27
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -3692,7 +3692,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
3692
3692
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3693
3693
|
class FindType extends combi_1.Expression {
|
|
3694
3694
|
getRunnable() {
|
|
3695
|
-
return (0, combi_1.opt)((0, combi_1.alt)("REGEX", "SUBSTRING", (0, combi_1.ver)(version_1.Version.v755, "PCRE")));
|
|
3695
|
+
return (0, combi_1.opt)((0, combi_1.alt)("REGEX", "SUBSTRING", (0, combi_1.ver)(version_1.Version.v755, "PCRE", version_1.Version.OpenABAP)));
|
|
3696
3696
|
}
|
|
3697
3697
|
}
|
|
3698
3698
|
exports.FindType = FindType;
|
|
@@ -9230,7 +9230,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
|
|
|
9230
9230
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
9231
9231
|
class CloseCursor {
|
|
9232
9232
|
getMatcher() {
|
|
9233
|
-
const ret = (0, combi_1.seq)("CLOSE CURSOR", expressions_1.
|
|
9233
|
+
const ret = (0, combi_1.seq)("CLOSE CURSOR", expressions_1.SQLSourceSimple);
|
|
9234
9234
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
9235
9235
|
}
|
|
9236
9236
|
}
|
|
@@ -11046,8 +11046,8 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
11046
11046
|
const sql_into_structure_1 = __webpack_require__(/*! ../expressions/sql_into_structure */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js");
|
|
11047
11047
|
class FetchNextCursor {
|
|
11048
11048
|
getMatcher() {
|
|
11049
|
-
const size = (0, combi_1.seq)("PACKAGE SIZE", expressions_1.
|
|
11050
|
-
const ret = (0, combi_1.seq)("FETCH NEXT CURSOR", expressions_1.
|
|
11049
|
+
const size = (0, combi_1.seq)("PACKAGE SIZE", expressions_1.SQLSourceSimple);
|
|
11050
|
+
const ret = (0, combi_1.seq)("FETCH NEXT CURSOR", expressions_1.SQLSourceSimple, (0, combi_1.alt)(sql_into_structure_1.SQLIntoStructure, expressions_1.SQLIntoTable), (0, combi_1.optPrio)(size));
|
|
11051
11051
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
11052
11052
|
}
|
|
11053
11053
|
}
|
|
@@ -13221,7 +13221,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
|
|
|
13221
13221
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
13222
13222
|
class OpenCursor {
|
|
13223
13223
|
getMatcher() {
|
|
13224
|
-
const ret = (0, combi_1.seq)("OPEN CURSOR", (0, combi_1.optPrio)("WITH HOLD"), expressions_1.SQLTarget, "FOR", expressions_1.Select
|
|
13224
|
+
const ret = (0, combi_1.seq)("OPEN CURSOR", (0, combi_1.optPrio)("WITH HOLD"), expressions_1.SQLTarget, "FOR", expressions_1.Select);
|
|
13225
13225
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
13226
13226
|
}
|
|
13227
13227
|
}
|
|
@@ -18439,8 +18439,14 @@ class BuiltIn {
|
|
|
18439
18439
|
}
|
|
18440
18440
|
getTypes() {
|
|
18441
18441
|
const ret = this.buildSY();
|
|
18442
|
-
|
|
18443
|
-
|
|
18442
|
+
{
|
|
18443
|
+
const id = new tokens_1.Identifier(new position_1.Position(1, 1), "abap_bool");
|
|
18444
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" })));
|
|
18445
|
+
}
|
|
18446
|
+
{
|
|
18447
|
+
const id = new tokens_1.Identifier(new position_1.Position(1, 1), "cursor");
|
|
18448
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, basic_1.IntegerType.get({ qualifiedName: "CURSOR", ddicName: "CURSOR" })));
|
|
18449
|
+
}
|
|
18444
18450
|
return ret;
|
|
18445
18451
|
}
|
|
18446
18452
|
get(extras) {
|
|
@@ -38736,8 +38742,12 @@ class AbstractFile {
|
|
|
38736
38742
|
// handle additional escaping
|
|
38737
38743
|
split[0] = split[0].replace(/%3e/g, ">");
|
|
38738
38744
|
split[0] = split[0].replace(/%3c/g, "<");
|
|
38739
|
-
// handle namespace
|
|
38740
|
-
|
|
38745
|
+
// handle abapGit namespace
|
|
38746
|
+
split[0] = split[0].toUpperCase().replace(/#/g, "/");
|
|
38747
|
+
// handle AFF namespace
|
|
38748
|
+
split[0] = split[0].replace("(", "/");
|
|
38749
|
+
split[0] = split[0].replace(")", "/");
|
|
38750
|
+
return split[0];
|
|
38741
38751
|
}
|
|
38742
38752
|
}
|
|
38743
38753
|
exports.AbstractFile = AbstractFile;
|
|
@@ -41491,6 +41501,68 @@ exports.APIReleaseState = APIReleaseState;
|
|
|
41491
41501
|
|
|
41492
41502
|
/***/ }),
|
|
41493
41503
|
|
|
41504
|
+
/***/ "./node_modules/@abaplint/core/build/src/objects/application_job_catalog_entry.js":
|
|
41505
|
+
/*!****************************************************************************************!*\
|
|
41506
|
+
!*** ./node_modules/@abaplint/core/build/src/objects/application_job_catalog_entry.js ***!
|
|
41507
|
+
\****************************************************************************************/
|
|
41508
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
41509
|
+
|
|
41510
|
+
"use strict";
|
|
41511
|
+
|
|
41512
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41513
|
+
exports.ApplicationJobCatalogEntry = void 0;
|
|
41514
|
+
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
41515
|
+
class ApplicationJobCatalogEntry extends _abstract_object_1.AbstractObject {
|
|
41516
|
+
getType() {
|
|
41517
|
+
return "SAJC";
|
|
41518
|
+
}
|
|
41519
|
+
getAllowedNaming() {
|
|
41520
|
+
return {
|
|
41521
|
+
maxLength: 30,
|
|
41522
|
+
allowNamespace: true,
|
|
41523
|
+
};
|
|
41524
|
+
}
|
|
41525
|
+
getDescription() {
|
|
41526
|
+
// todo
|
|
41527
|
+
return undefined;
|
|
41528
|
+
}
|
|
41529
|
+
}
|
|
41530
|
+
exports.ApplicationJobCatalogEntry = ApplicationJobCatalogEntry;
|
|
41531
|
+
//# sourceMappingURL=application_job_catalog_entry.js.map
|
|
41532
|
+
|
|
41533
|
+
/***/ }),
|
|
41534
|
+
|
|
41535
|
+
/***/ "./node_modules/@abaplint/core/build/src/objects/application_job_template.js":
|
|
41536
|
+
/*!***********************************************************************************!*\
|
|
41537
|
+
!*** ./node_modules/@abaplint/core/build/src/objects/application_job_template.js ***!
|
|
41538
|
+
\***********************************************************************************/
|
|
41539
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
41540
|
+
|
|
41541
|
+
"use strict";
|
|
41542
|
+
|
|
41543
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41544
|
+
exports.ApplicationJobTemplate = void 0;
|
|
41545
|
+
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
41546
|
+
class ApplicationJobTemplate extends _abstract_object_1.AbstractObject {
|
|
41547
|
+
getType() {
|
|
41548
|
+
return "SAJT";
|
|
41549
|
+
}
|
|
41550
|
+
getAllowedNaming() {
|
|
41551
|
+
return {
|
|
41552
|
+
maxLength: 30,
|
|
41553
|
+
allowNamespace: true,
|
|
41554
|
+
};
|
|
41555
|
+
}
|
|
41556
|
+
getDescription() {
|
|
41557
|
+
// todo
|
|
41558
|
+
return undefined;
|
|
41559
|
+
}
|
|
41560
|
+
}
|
|
41561
|
+
exports.ApplicationJobTemplate = ApplicationJobTemplate;
|
|
41562
|
+
//# sourceMappingURL=application_job_template.js.map
|
|
41563
|
+
|
|
41564
|
+
/***/ }),
|
|
41565
|
+
|
|
41494
41566
|
/***/ "./node_modules/@abaplint/core/build/src/objects/assignment_service_to_authorization_group.js":
|
|
41495
41567
|
/*!****************************************************************************************************!*\
|
|
41496
41568
|
!*** ./node_modules/@abaplint/core/build/src/objects/assignment_service_to_authorization_group.js ***!
|
|
@@ -44323,6 +44395,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
44323
44395
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
44324
44396
|
__exportStar(__webpack_require__(/*! ./activation_variant */ "./node_modules/@abaplint/core/build/src/objects/activation_variant.js"), exports);
|
|
44325
44397
|
__exportStar(__webpack_require__(/*! ./api_release_state */ "./node_modules/@abaplint/core/build/src/objects/api_release_state.js"), exports);
|
|
44398
|
+
__exportStar(__webpack_require__(/*! ./application_job_catalog_entry */ "./node_modules/@abaplint/core/build/src/objects/application_job_catalog_entry.js"), exports);
|
|
44399
|
+
__exportStar(__webpack_require__(/*! ./application_job_template */ "./node_modules/@abaplint/core/build/src/objects/application_job_template.js"), exports);
|
|
44326
44400
|
__exportStar(__webpack_require__(/*! ./assignment_service_to_authorization_group */ "./node_modules/@abaplint/core/build/src/objects/assignment_service_to_authorization_group.js"), exports);
|
|
44327
44401
|
__exportStar(__webpack_require__(/*! ./atc_check_category */ "./node_modules/@abaplint/core/build/src/objects/atc_check_category.js"), exports);
|
|
44328
44402
|
__exportStar(__webpack_require__(/*! ./atc_check_object */ "./node_modules/@abaplint/core/build/src/objects/atc_check_object.js"), exports);
|
|
@@ -44402,6 +44476,7 @@ __exportStar(__webpack_require__(/*! ./mime_object */ "./node_modules/@abaplint/
|
|
|
44402
44476
|
__exportStar(__webpack_require__(/*! ./namespace */ "./node_modules/@abaplint/core/build/src/objects/namespace.js"), exports);
|
|
44403
44477
|
__exportStar(__webpack_require__(/*! ./number_range */ "./node_modules/@abaplint/core/build/src/objects/number_range.js"), exports);
|
|
44404
44478
|
__exportStar(__webpack_require__(/*! ./object_characteristic */ "./node_modules/@abaplint/core/build/src/objects/object_characteristic.js"), exports);
|
|
44479
|
+
__exportStar(__webpack_require__(/*! ./outbound_service */ "./node_modules/@abaplint/core/build/src/objects/outbound_service.js"), exports);
|
|
44405
44480
|
__exportStar(__webpack_require__(/*! ./package_interface */ "./node_modules/@abaplint/core/build/src/objects/package_interface.js"), exports);
|
|
44406
44481
|
__exportStar(__webpack_require__(/*! ./package */ "./node_modules/@abaplint/core/build/src/objects/package.js"), exports);
|
|
44407
44482
|
__exportStar(__webpack_require__(/*! ./parameter */ "./node_modules/@abaplint/core/build/src/objects/parameter.js"), exports);
|
|
@@ -45054,6 +45129,37 @@ exports.ObjectCharacteristic = ObjectCharacteristic;
|
|
|
45054
45129
|
|
|
45055
45130
|
/***/ }),
|
|
45056
45131
|
|
|
45132
|
+
/***/ "./node_modules/@abaplint/core/build/src/objects/outbound_service.js":
|
|
45133
|
+
/*!***************************************************************************!*\
|
|
45134
|
+
!*** ./node_modules/@abaplint/core/build/src/objects/outbound_service.js ***!
|
|
45135
|
+
\***************************************************************************/
|
|
45136
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
45137
|
+
|
|
45138
|
+
"use strict";
|
|
45139
|
+
|
|
45140
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
45141
|
+
exports.OutboundService = void 0;
|
|
45142
|
+
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
45143
|
+
class OutboundService extends _abstract_object_1.AbstractObject {
|
|
45144
|
+
getType() {
|
|
45145
|
+
return "SCO3";
|
|
45146
|
+
}
|
|
45147
|
+
getAllowedNaming() {
|
|
45148
|
+
return {
|
|
45149
|
+
maxLength: 200,
|
|
45150
|
+
allowNamespace: true,
|
|
45151
|
+
};
|
|
45152
|
+
}
|
|
45153
|
+
getDescription() {
|
|
45154
|
+
// todo
|
|
45155
|
+
return undefined;
|
|
45156
|
+
}
|
|
45157
|
+
}
|
|
45158
|
+
exports.OutboundService = OutboundService;
|
|
45159
|
+
//# sourceMappingURL=outbound_service.js.map
|
|
45160
|
+
|
|
45161
|
+
/***/ }),
|
|
45162
|
+
|
|
45057
45163
|
/***/ "./node_modules/@abaplint/core/build/src/objects/package.js":
|
|
45058
45164
|
/*!******************************************************************!*\
|
|
45059
45165
|
!*** ./node_modules/@abaplint/core/build/src/objects/package.js ***!
|
|
@@ -47841,7 +47947,7 @@ class Registry {
|
|
|
47841
47947
|
}
|
|
47842
47948
|
static abaplintVersion() {
|
|
47843
47949
|
// magic, see build script "version.sh"
|
|
47844
|
-
return "2.102.
|
|
47950
|
+
return "2.102.41";
|
|
47845
47951
|
}
|
|
47846
47952
|
getDDICReferences() {
|
|
47847
47953
|
return this.ddicReferences;
|
|
@@ -51053,6 +51159,9 @@ class CloudTypes {
|
|
|
51053
51159
|
|| obj instanceof Objects.CDSMetadataExtension
|
|
51054
51160
|
|| obj instanceof Objects.RestrictionField
|
|
51055
51161
|
|| obj instanceof Objects.Class
|
|
51162
|
+
|| obj instanceof Objects.OutboundService
|
|
51163
|
+
|| obj instanceof Objects.ApplicationJobCatalogEntry
|
|
51164
|
+
|| obj instanceof Objects.ApplicationJobTemplate
|
|
51056
51165
|
|| obj instanceof Objects.CommunicationScenario
|
|
51057
51166
|
|| obj instanceof Objects.DataControl
|
|
51058
51167
|
|| obj instanceof Objects.DataDefinition
|
|
@@ -71284,6 +71393,7 @@ __exportStar(__webpack_require__(/*! ./source */ "./node_modules/@abaplint/trans
|
|
|
71284
71393
|
__exportStar(__webpack_require__(/*! ./sql_arithmetic_operator */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_arithmetic_operator.js"), exports);
|
|
71285
71394
|
__exportStar(__webpack_require__(/*! ./sql_cond */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js"), exports);
|
|
71286
71395
|
__exportStar(__webpack_require__(/*! ./sql_field_and_value */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_and_value.js"), exports);
|
|
71396
|
+
__exportStar(__webpack_require__(/*! ./sql_field_list */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_list.js"), exports);
|
|
71287
71397
|
__exportStar(__webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js"), exports);
|
|
71288
71398
|
__exportStar(__webpack_require__(/*! ./sql_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field.js"), exports);
|
|
71289
71399
|
__exportStar(__webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js"), exports);
|
|
@@ -72402,6 +72512,44 @@ exports.SQLFieldAndValueTranspiler = SQLFieldAndValueTranspiler;
|
|
|
72402
72512
|
|
|
72403
72513
|
/***/ }),
|
|
72404
72514
|
|
|
72515
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_list.js":
|
|
72516
|
+
/*!***********************************************************************************!*\
|
|
72517
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_list.js ***!
|
|
72518
|
+
\***********************************************************************************/
|
|
72519
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
72520
|
+
|
|
72521
|
+
"use strict";
|
|
72522
|
+
|
|
72523
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
72524
|
+
exports.SQLFieldListTranspiler = void 0;
|
|
72525
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
72526
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
72527
|
+
const sql_field_1 = __webpack_require__(/*! ./sql_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field.js");
|
|
72528
|
+
const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
|
|
72529
|
+
class SQLFieldListTranspiler {
|
|
72530
|
+
transpile(node, traversal) {
|
|
72531
|
+
const fields = [];
|
|
72532
|
+
for (const f of node.getChildren() || []) {
|
|
72533
|
+
if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLField) {
|
|
72534
|
+
const code = new sql_field_1.SQLFieldTranspiler().transpile(f, traversal).getCode();
|
|
72535
|
+
fields.push(code);
|
|
72536
|
+
}
|
|
72537
|
+
else if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLFieldName) {
|
|
72538
|
+
const code = new sql_field_name_1.SQLFieldNameTranspiler().transpile(f, traversal).getCode();
|
|
72539
|
+
fields.push(code);
|
|
72540
|
+
}
|
|
72541
|
+
else {
|
|
72542
|
+
fields.push(f.concatTokens());
|
|
72543
|
+
}
|
|
72544
|
+
}
|
|
72545
|
+
return new chunk_1.Chunk().append(fields.join(", "), node, traversal);
|
|
72546
|
+
}
|
|
72547
|
+
}
|
|
72548
|
+
exports.SQLFieldListTranspiler = SQLFieldListTranspiler;
|
|
72549
|
+
//# sourceMappingURL=sql_field_list.js.map
|
|
72550
|
+
|
|
72551
|
+
/***/ }),
|
|
72552
|
+
|
|
72405
72553
|
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js":
|
|
72406
72554
|
/*!***********************************************************************************!*\
|
|
72407
72555
|
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js ***!
|
|
@@ -74819,6 +74967,29 @@ exports.ClearTranspiler = ClearTranspiler;
|
|
|
74819
74967
|
|
|
74820
74968
|
/***/ }),
|
|
74821
74969
|
|
|
74970
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js":
|
|
74971
|
+
/*!********************************************************************************!*\
|
|
74972
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js ***!
|
|
74973
|
+
\********************************************************************************/
|
|
74974
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
74975
|
+
|
|
74976
|
+
"use strict";
|
|
74977
|
+
|
|
74978
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
74979
|
+
exports.CloseCursorTranspiler = void 0;
|
|
74980
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
74981
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
74982
|
+
class CloseCursorTranspiler {
|
|
74983
|
+
transpile(node, traversal) {
|
|
74984
|
+
const cursor = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLSourceSimple)).getCode();
|
|
74985
|
+
return new chunk_1.Chunk().append(`await abap.statements.closeCursor(${cursor});`, node, traversal);
|
|
74986
|
+
}
|
|
74987
|
+
}
|
|
74988
|
+
exports.CloseCursorTranspiler = CloseCursorTranspiler;
|
|
74989
|
+
//# sourceMappingURL=close_cursor.js.map
|
|
74990
|
+
|
|
74991
|
+
/***/ }),
|
|
74992
|
+
|
|
74822
74993
|
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js":
|
|
74823
74994
|
/*!*********************************************************************************!*\
|
|
74824
74995
|
!*** ./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js ***!
|
|
@@ -76033,6 +76204,36 @@ exports.ExportTranspiler = ExportTranspiler;
|
|
|
76033
76204
|
|
|
76034
76205
|
/***/ }),
|
|
76035
76206
|
|
|
76207
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/fetch_next_cursor.js":
|
|
76208
|
+
/*!*************************************************************************************!*\
|
|
76209
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/statements/fetch_next_cursor.js ***!
|
|
76210
|
+
\*************************************************************************************/
|
|
76211
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
76212
|
+
|
|
76213
|
+
"use strict";
|
|
76214
|
+
|
|
76215
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
76216
|
+
exports.FetchNextCursorTranspiler = void 0;
|
|
76217
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
76218
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
76219
|
+
class FetchNextCursorTranspiler {
|
|
76220
|
+
transpile(node, traversal) {
|
|
76221
|
+
const cursor = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLSourceSimple)).getCode();
|
|
76222
|
+
// todo: APPENDING and CORRESPONDING FIELDS
|
|
76223
|
+
const target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLTarget)).getCode();
|
|
76224
|
+
let packageSize = "";
|
|
76225
|
+
const siz = node.findExpressionAfterToken("SIZE");
|
|
76226
|
+
if (siz) {
|
|
76227
|
+
packageSize = ", " + traversal.traverse(siz).getCode();
|
|
76228
|
+
}
|
|
76229
|
+
return new chunk_1.Chunk().append(`await abap.statements.fetchNextCursor(${cursor}, ${target}${packageSize});`, node, traversal);
|
|
76230
|
+
}
|
|
76231
|
+
}
|
|
76232
|
+
exports.FetchNextCursorTranspiler = FetchNextCursorTranspiler;
|
|
76233
|
+
//# sourceMappingURL=fetch_next_cursor.js.map
|
|
76234
|
+
|
|
76235
|
+
/***/ }),
|
|
76236
|
+
|
|
76036
76237
|
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/field_symbol.js":
|
|
76037
76238
|
/*!********************************************************************************!*\
|
|
76038
76239
|
!*** ./node_modules/@abaplint/transpiler/build/src/statements/field_symbol.js ***!
|
|
@@ -76582,6 +76783,9 @@ __exportStar(__webpack_require__(/*! ./class_definition_load */ "./node_modules/
|
|
|
76582
76783
|
__exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/transpiler/build/src/statements/class_implementation.js"), exports);
|
|
76583
76784
|
__exportStar(__webpack_require__(/*! ./class_local_friends */ "./node_modules/@abaplint/transpiler/build/src/statements/class_local_friends.js"), exports);
|
|
76584
76785
|
__exportStar(__webpack_require__(/*! ./clear */ "./node_modules/@abaplint/transpiler/build/src/statements/clear.js"), exports);
|
|
76786
|
+
__exportStar(__webpack_require__(/*! ./open_cursor */ "./node_modules/@abaplint/transpiler/build/src/statements/open_cursor.js"), exports);
|
|
76787
|
+
__exportStar(__webpack_require__(/*! ./close_cursor */ "./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js"), exports);
|
|
76788
|
+
__exportStar(__webpack_require__(/*! ./fetch_next_cursor */ "./node_modules/@abaplint/transpiler/build/src/statements/fetch_next_cursor.js"), exports);
|
|
76585
76789
|
__exportStar(__webpack_require__(/*! ./close_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js"), exports);
|
|
76586
76790
|
__exportStar(__webpack_require__(/*! ./collect */ "./node_modules/@abaplint/transpiler/build/src/statements/collect.js"), exports);
|
|
76587
76791
|
__exportStar(__webpack_require__(/*! ./commit */ "./node_modules/@abaplint/transpiler/build/src/statements/commit.js"), exports);
|
|
@@ -76764,6 +76968,15 @@ class InsertDatabaseTranspiler {
|
|
|
76764
76968
|
const tvalues = traversal.traverse(fromTable);
|
|
76765
76969
|
options.push(`"table": ` + tvalues.getCode());
|
|
76766
76970
|
}
|
|
76971
|
+
const connection = node.findDirectExpression(abaplint.Expressions.DatabaseConnection);
|
|
76972
|
+
if (connection) {
|
|
76973
|
+
let con = connection.getLastToken().getStr().toUpperCase();
|
|
76974
|
+
if (con === "DEFAULT_") {
|
|
76975
|
+
// todo, workaround for replacing of keywords,
|
|
76976
|
+
con = "DEFAULT";
|
|
76977
|
+
}
|
|
76978
|
+
options.push(`"connection": "${con}"`);
|
|
76979
|
+
}
|
|
76767
76980
|
return new chunk_1.Chunk(`await abap.statements.insertDatabase(${table.getCode()}, {${options.join(", ")}});`);
|
|
76768
76981
|
}
|
|
76769
76982
|
}
|
|
@@ -77558,6 +77771,41 @@ exports.MoveCorrespondingTranspiler = MoveCorrespondingTranspiler;
|
|
|
77558
77771
|
|
|
77559
77772
|
/***/ }),
|
|
77560
77773
|
|
|
77774
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/open_cursor.js":
|
|
77775
|
+
/*!*******************************************************************************!*\
|
|
77776
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/statements/open_cursor.js ***!
|
|
77777
|
+
\*******************************************************************************/
|
|
77778
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
77779
|
+
|
|
77780
|
+
"use strict";
|
|
77781
|
+
|
|
77782
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
77783
|
+
exports.OpenCursorTranspiler = void 0;
|
|
77784
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
77785
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
77786
|
+
class OpenCursorTranspiler {
|
|
77787
|
+
transpile(node, traversal) {
|
|
77788
|
+
const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.SQLTarget)).getCode();
|
|
77789
|
+
const selectExpression = node.findDirectExpression(abaplint.Expressions.Select);
|
|
77790
|
+
let select = "SELECT ";
|
|
77791
|
+
select += traversal.traverse(selectExpression === null || selectExpression === void 0 ? void 0 : selectExpression.findDirectExpression(abaplint.Expressions.SQLFieldList)).getCode() + " ";
|
|
77792
|
+
select += traversal.traverse(selectExpression === null || selectExpression === void 0 ? void 0 : selectExpression.findDirectExpression(abaplint.Expressions.SQLFrom)).getCode();
|
|
77793
|
+
const cond = selectExpression === null || selectExpression === void 0 ? void 0 : selectExpression.findDirectExpression(abaplint.Expressions.SQLCond);
|
|
77794
|
+
if (cond) {
|
|
77795
|
+
select += "WHERE " + traversal.traverse(node).getCode();
|
|
77796
|
+
}
|
|
77797
|
+
const orderBy = selectExpression === null || selectExpression === void 0 ? void 0 : selectExpression.findDirectExpression(abaplint.Expressions.SQLOrderBy);
|
|
77798
|
+
if (orderBy) {
|
|
77799
|
+
select += "ORDER BY " + traversal.traverse(node).getCode();
|
|
77800
|
+
}
|
|
77801
|
+
return new chunk_1.Chunk().append(`await abap.statements.openCursor(${target}, "${select}");`, node, traversal);
|
|
77802
|
+
}
|
|
77803
|
+
}
|
|
77804
|
+
exports.OpenCursorTranspiler = OpenCursorTranspiler;
|
|
77805
|
+
//# sourceMappingURL=open_cursor.js.map
|
|
77806
|
+
|
|
77807
|
+
/***/ }),
|
|
77808
|
+
|
|
77561
77809
|
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/open_dataset.js":
|
|
77562
77810
|
/*!********************************************************************************!*\
|
|
77563
77811
|
!*** ./node_modules/@abaplint/transpiler/build/src/statements/open_dataset.js ***!
|
|
@@ -78306,21 +78554,10 @@ class SelectTranspiler {
|
|
|
78306
78554
|
let select = "SELECT ";
|
|
78307
78555
|
const fieldList = node.findFirstExpression(abaplint.Expressions.SQLFieldList)
|
|
78308
78556
|
|| node.findFirstExpression(abaplint.Expressions.SQLFieldListLoop);
|
|
78309
|
-
|
|
78310
|
-
|
|
78311
|
-
if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLField) {
|
|
78312
|
-
const code = new expressions_1.SQLFieldTranspiler().transpile(f, traversal).getCode();
|
|
78313
|
-
fields.push(code);
|
|
78314
|
-
}
|
|
78315
|
-
else if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLFieldName) {
|
|
78316
|
-
const code = new expressions_1.SQLFieldNameTranspiler().transpile(f, traversal).getCode();
|
|
78317
|
-
fields.push(code);
|
|
78318
|
-
}
|
|
78319
|
-
else {
|
|
78320
|
-
fields.push(f.concatTokens());
|
|
78321
|
-
}
|
|
78557
|
+
if (fieldList === undefined) {
|
|
78558
|
+
throw new Error("SelectTranspiler, field list not found");
|
|
78322
78559
|
}
|
|
78323
|
-
select +=
|
|
78560
|
+
select += new expressions_1.SQLFieldListTranspiler().transpile(fieldList, traversal).getCode() + " ";
|
|
78324
78561
|
const from = node.findFirstExpression(abaplint.Expressions.SQLFrom);
|
|
78325
78562
|
if (from) {
|
|
78326
78563
|
select += new sql_from_1.SQLFromTranspiler().transpile(from, traversal).getCode();
|
|
@@ -80341,6 +80578,7 @@ class SelectTranspiler {
|
|
|
80341
80578
|
const loopName = unique_identifier_1.UniqueIdentifier.get();
|
|
80342
80579
|
ret.appendString(`let ${targetName} = new abap.types.Table(abap.DDIC["${from}"].type);\n`);
|
|
80343
80580
|
ret.appendChunk(new select_1.SelectTranspiler().transpile(selectStatement, traversal, targetName));
|
|
80581
|
+
// todo: optimize, it should do real streaming?
|
|
80344
80582
|
const packageSize = (_b = node.findFirstExpression(abaplint.Expressions.SelectLoop)) === null || _b === void 0 ? void 0 : _b.findExpressionAfterToken("SIZE");
|
|
80345
80583
|
if (packageSize) {
|
|
80346
80584
|
const getSize = new expressions_1.SQLSourceTranspiler().transpile(packageSize, traversal).getCode() + ".get()";
|
|
@@ -81474,15 +81712,24 @@ globalThis.abap = new runtime.ABAP();\n`;
|
|
|
81474
81712
|
export async function initializeABAP() {\n`;
|
|
81475
81713
|
ret += ` const sqlite = [];\n`;
|
|
81476
81714
|
for (const i of dbSetup.schemas.sqlite) {
|
|
81477
|
-
ret += `sqlite.push(\`${i}\`);\n`;
|
|
81715
|
+
ret += ` sqlite.push(\`${i}\`);\n`;
|
|
81478
81716
|
}
|
|
81479
81717
|
ret += ` const hdb = \`${dbSetup.schemas.hdb}\`;\n`;
|
|
81480
|
-
ret += ` const pg =
|
|
81481
|
-
|
|
81718
|
+
ret += ` const pg = [];\n`;
|
|
81719
|
+
for (const i of dbSetup.schemas.pg) {
|
|
81720
|
+
ret += ` pg.push(\`${i}\`);\n`;
|
|
81721
|
+
}
|
|
81722
|
+
ret += ` const snowflake = [];\n`;
|
|
81723
|
+
for (const i of dbSetup.schemas.snowflake) {
|
|
81724
|
+
ret += ` snowflake.push(\`${i}\`);\n`;
|
|
81725
|
+
}
|
|
81726
|
+
ret += ` const schemas = {sqlite, hdb, pg, snowflake};\n`;
|
|
81727
|
+
ret += `\n`;
|
|
81482
81728
|
ret += ` const insert = [];\n`;
|
|
81483
81729
|
for (const i of dbSetup.insert) {
|
|
81484
81730
|
ret += ` insert.push(\`${i}\`);\n`;
|
|
81485
81731
|
}
|
|
81732
|
+
ret += `\n`;
|
|
81486
81733
|
if (extraSetup === undefined) {
|
|
81487
81734
|
ret += `// no setup logic specified in config\n`;
|
|
81488
81735
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.97",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.97",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|
|
33
33
|
"@types/node": "^20.6.0",
|
|
34
|
-
"@abaplint/core": "^2.102.
|
|
34
|
+
"@abaplint/core": "^2.102.41",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.88.2",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|