@abaplint/core 2.113.36 → 2.113.37
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.
|
@@ -22,7 +22,8 @@ class TypeTable extends combi_1.Expression {
|
|
|
22
22
|
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "FAILED", "LOCK", "READ RESULT", "UPDATE"), _1.TypeName));
|
|
23
23
|
const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
24
24
|
const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
25
|
-
const
|
|
25
|
+
const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
|
|
26
|
+
const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, typeLine, derived)));
|
|
26
27
|
return ret;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -13,7 +13,10 @@ class CDSDetermineTypes {
|
|
|
13
13
|
const components = [];
|
|
14
14
|
for (const f of (parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields) || []) {
|
|
15
15
|
if (f.prefix !== "") {
|
|
16
|
-
|
|
16
|
+
let source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === f.prefix.toUpperCase(); });
|
|
17
|
+
if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
|
|
18
|
+
source = parsedData.sources.find((s) => s.name.toUpperCase() === f.prefix.toUpperCase());
|
|
19
|
+
}
|
|
17
20
|
if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
|
|
18
21
|
components.push({
|
|
19
22
|
name: f.name,
|
|
@@ -7,7 +7,7 @@ const cds_integer_1 = require("./cds_integer");
|
|
|
7
7
|
class CDSCondition extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
9
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));
|
|
10
|
-
const left = (0, combi_1.alt)(name, _1.CDSFunction);
|
|
10
|
+
const left = (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString);
|
|
11
11
|
const compare = (0, combi_1.seq)(left, (0, combi_1.alt)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), "<", ">", (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "LIKE", "NOT LIKE"), (0, combi_1.alt)(left, cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSString));
|
|
12
12
|
const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
|
|
13
13
|
const condition = (0, combi_1.alt)(compare, is);
|
|
@@ -17,6 +17,14 @@ class CDSFunction extends combi_1.Expression {
|
|
|
17
17
|
const substring = (0, combi_1.seq)("SUBSTRING", "(", input, ",", input, ",", input, ")");
|
|
18
18
|
const bintohex = (0, combi_1.seq)("BINTOHEX", "(", input, ")");
|
|
19
19
|
const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", input, ")");
|
|
20
|
+
const upper = (0, combi_1.seq)("UPPER", "(", input, ")");
|
|
21
|
+
const lower = (0, combi_1.seq)("LOWER", "(", input, ")");
|
|
22
|
+
const abs = (0, combi_1.seq)("ABS", "(", input, ")");
|
|
23
|
+
const ceil = (0, combi_1.seq)("CEIL", "(", input, ")");
|
|
24
|
+
const floor = (0, combi_1.seq)("FLOOR", "(", input, ")");
|
|
25
|
+
const round = (0, combi_1.seq)("ROUND", "(", input, ",", input, ")");
|
|
26
|
+
const div = (0, combi_1.seq)("DIV", "(", input, ",", input, ")");
|
|
27
|
+
const division = (0, combi_1.seq)("DIVISION", "(", input, ",", input, ")");
|
|
20
28
|
const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", input, ",", input, ",", input, ",", input, ")");
|
|
21
29
|
const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", input, ",", input, ",", input, ",", input, ")");
|
|
22
30
|
const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", input, ",", input, ",", input, ",", input, ")");
|
|
@@ -30,7 +38,7 @@ class CDSFunction extends combi_1.Expression {
|
|
|
30
38
|
const mod = (0, combi_1.seq)("MOD", "(", input, ",", input, ")");
|
|
31
39
|
const left = (0, combi_1.seq)("LEFT", "(", input, ",", input, ")");
|
|
32
40
|
const right = (0, combi_1.seq)("RIGHT", "(", input, ",", input, ")");
|
|
33
|
-
return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right);
|
|
41
|
+
return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right);
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
44
|
exports.CDSFunction = CDSFunction;
|
package/build/src/registry.js
CHANGED