@abaplint/runtime 2.5.38 → 2.5.40
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/src/abap_regex.d.ts +4 -4
- package/build/src/abap_regex.js +18 -18
- package/build/src/binary_search.d.ts +5 -5
- package/build/src/binary_search.js +48 -48
- package/build/src/builtin/abs.d.ts +5 -5
- package/build/src/builtin/abs.js +17 -17
- package/build/src/builtin/boolc.d.ts +4 -4
- package/build/src/builtin/boolc.js +22 -22
- package/build/src/builtin/ceil.d.ts +5 -5
- package/build/src/builtin/ceil.js +17 -17
- package/build/src/builtin/concat_lines_of.d.ts +7 -7
- package/build/src/builtin/concat_lines_of.js +15 -15
- package/build/src/builtin/condense.d.ts +9 -9
- package/build/src/builtin/condense.js +28 -28
- package/build/src/builtin/contains.d.ts +12 -12
- package/build/src/builtin/contains.js +15 -15
- package/build/src/builtin/cos.d.ts +5 -5
- package/build/src/builtin/cos.js +22 -22
- package/build/src/builtin/count.d.ts +12 -12
- package/build/src/builtin/count.js +37 -37
- package/build/src/builtin/count_any_of.d.ts +8 -8
- package/build/src/builtin/count_any_of.js +17 -17
- package/build/src/builtin/escape.d.ts +7 -7
- package/build/src/builtin/escape.js +30 -30
- package/build/src/builtin/find.d.ts +13 -13
- package/build/src/builtin/find.js +57 -57
- package/build/src/builtin/floor.d.ts +5 -5
- package/build/src/builtin/floor.js +17 -17
- package/build/src/builtin/frac.d.ts +6 -6
- package/build/src/builtin/frac.js +40 -40
- package/build/src/builtin/index.d.ts +47 -47
- package/build/src/builtin/index.js +64 -64
- package/build/src/builtin/insert.d.ts +9 -9
- package/build/src/builtin/insert.js +15 -15
- package/build/src/builtin/ipow.d.ts +6 -6
- package/build/src/builtin/ipow.js +27 -27
- package/build/src/builtin/lines.d.ts +4 -4
- package/build/src/builtin/lines.js +8 -8
- package/build/src/builtin/match.d.ts +5 -5
- package/build/src/builtin/match.js +22 -22
- package/build/src/builtin/matches.d.ts +6 -6
- package/build/src/builtin/matches.js +29 -29
- package/build/src/builtin/nmax.d.ts +14 -14
- package/build/src/builtin/nmax.js +34 -34
- package/build/src/builtin/nmin.d.ts +14 -14
- package/build/src/builtin/nmin.js +34 -34
- package/build/src/builtin/numofchar.d.ts +5 -5
- package/build/src/builtin/numofchar.js +15 -15
- package/build/src/builtin/repeat.d.ts +6 -6
- package/build/src/builtin/repeat.js +9 -9
- package/build/src/builtin/replace.d.ts +13 -13
- package/build/src/builtin/replace.js +65 -65
- package/build/src/builtin/reverse.d.ts +5 -5
- package/build/src/builtin/reverse.js +16 -16
- package/build/src/builtin/round.d.ts +8 -8
- package/build/src/builtin/round.js +41 -41
- package/build/src/builtin/segment.d.ts +8 -8
- package/build/src/builtin/segment.js +32 -32
- package/build/src/builtin/shift_left.d.ts +9 -9
- package/build/src/builtin/shift_left.js +30 -30
- package/build/src/builtin/sign.d.ts +5 -5
- package/build/src/builtin/sign.js +17 -17
- package/build/src/builtin/sin.d.ts +5 -5
- package/build/src/builtin/sin.js +22 -22
- package/build/src/builtin/sqrt.d.ts +5 -5
- package/build/src/builtin/sqrt.js +22 -22
- package/build/src/builtin/strlen.d.ts +5 -5
- package/build/src/builtin/strlen.js +15 -15
- package/build/src/builtin/substring.d.ts +8 -8
- package/build/src/builtin/substring.js +28 -28
- package/build/src/builtin/substring_after.d.ts +6 -6
- package/build/src/builtin/substring_after.js +28 -28
- package/build/src/builtin/substring_before.d.ts +6 -6
- package/build/src/builtin/substring_before.js +28 -28
- package/build/src/builtin/sy.d.ts +2 -2
- package/build/src/builtin/sy.js +30 -30
- package/build/src/builtin/tan.d.ts +5 -5
- package/build/src/builtin/tan.js +22 -22
- package/build/src/builtin/to_lower.d.ts +4 -4
- package/build/src/builtin/to_lower.js +9 -9
- package/build/src/builtin/to_mixed.d.ts +9 -9
- package/build/src/builtin/to_mixed.js +48 -48
- package/build/src/builtin/to_upper.d.ts +4 -4
- package/build/src/builtin/to_upper.js +9 -9
- package/build/src/builtin/translate.d.ts +6 -6
- package/build/src/builtin/translate.js +19 -19
- package/build/src/builtin/trunc.d.ts +5 -5
- package/build/src/builtin/trunc.js +17 -17
- package/build/src/builtin/xstrlen.d.ts +5 -5
- package/build/src/builtin/xstrlen.js +13 -13
- package/build/src/classic_error.d.ts +6 -6
- package/build/src/classic_error.js +10 -10
- package/build/src/clone.d.ts +1 -1
- package/build/src/clone.js +37 -37
- package/build/src/compare/assigned.d.ts +2 -2
- package/build/src/compare/assigned.js +7 -7
- package/build/src/compare/between.d.ts +2 -2
- package/build/src/compare/between.js +9 -9
- package/build/src/compare/ca.d.ts +3 -3
- package/build/src/compare/ca.js +36 -36
- package/build/src/compare/cn.d.ts +3 -3
- package/build/src/compare/cn.js +8 -8
- package/build/src/compare/co.d.ts +4 -4
- package/build/src/compare/co.js +37 -37
- package/build/src/compare/cp.d.ts +4 -4
- package/build/src/compare/cp.js +48 -48
- package/build/src/compare/cs.d.ts +3 -3
- package/build/src/compare/cs.js +33 -33
- package/build/src/compare/eq.d.ts +4 -4
- package/build/src/compare/eq.js +134 -134
- package/build/src/compare/ge.d.ts +3 -3
- package/build/src/compare/ge.js +8 -8
- package/build/src/compare/gt.d.ts +4 -4
- package/build/src/compare/gt.js +107 -107
- package/build/src/compare/in.d.ts +4 -4
- package/build/src/compare/in.js +34 -34
- package/build/src/compare/index.d.ts +22 -22
- package/build/src/compare/index.js +40 -40
- package/build/src/compare/initial.d.ts +4 -4
- package/build/src/compare/initial.js +63 -63
- package/build/src/compare/instance_of.d.ts +2 -2
- package/build/src/compare/instance_of.js +7 -7
- package/build/src/compare/le.d.ts +3 -3
- package/build/src/compare/le.js +8 -8
- package/build/src/compare/lt.d.ts +4 -4
- package/build/src/compare/lt.js +8 -8
- package/build/src/compare/m.d.ts +3 -3
- package/build/src/compare/m.js +37 -37
- package/build/src/compare/na.d.ts +3 -3
- package/build/src/compare/na.js +8 -8
- package/build/src/compare/ne.d.ts +3 -3
- package/build/src/compare/ne.js +8 -8
- package/build/src/compare/np.d.ts +3 -3
- package/build/src/compare/np.js +8 -8
- package/build/src/compare/ns.d.ts +3 -3
- package/build/src/compare/ns.js +8 -8
- package/build/src/compare/o.d.ts +2 -2
- package/build/src/compare/o.js +28 -28
- package/build/src/compare/z.d.ts +2 -2
- package/build/src/compare/z.js +28 -28
- package/build/src/console.d.ts +7 -7
- package/build/src/console.js +21 -21
- package/build/src/context.d.ts +13 -13
- package/build/src/context.js +17 -17
- package/build/src/db/db.d.ts +55 -55
- package/build/src/db/db.js +2 -2
- package/build/src/expand_dynamic.d.ts +2 -2
- package/build/src/expand_dynamic.js +22 -22
- package/build/src/expand_in.d.ts +2 -2
- package/build/src/expand_in.js +24 -24
- package/build/src/index.d.ts +52 -52
- package/build/src/index.js +54 -54
- package/build/src/offset_length.d.ts +16 -16
- package/build/src/offset_length.js +78 -78
- package/build/src/operators/_bit_operations.d.ts +6 -6
- package/build/src/operators/_bit_operations.js +29 -29
- package/build/src/operators/_parse.d.ts +4 -4
- package/build/src/operators/_parse.js +45 -45
- package/build/src/operators/add.d.ts +4 -4
- package/build/src/operators/add.js +42 -42
- package/build/src/operators/bit-and.d.ts +2 -2
- package/build/src/operators/bit-and.js +18 -18
- package/build/src/operators/bit-not.d.ts +2 -2
- package/build/src/operators/bit-not.js +14 -14
- package/build/src/operators/bit-or.d.ts +2 -2
- package/build/src/operators/bit-or.js +18 -18
- package/build/src/operators/bit-xor.d.ts +2 -2
- package/build/src/operators/bit-xor.js +18 -18
- package/build/src/operators/concat.d.ts +4 -4
- package/build/src/operators/concat.js +35 -35
- package/build/src/operators/div.d.ts +4 -4
- package/build/src/operators/div.js +12 -12
- package/build/src/operators/divide.d.ts +4 -4
- package/build/src/operators/divide.js +16 -16
- package/build/src/operators/index.d.ts +12 -12
- package/build/src/operators/index.js +28 -28
- package/build/src/operators/minus.d.ts +4 -4
- package/build/src/operators/minus.js +41 -41
- package/build/src/operators/mod.d.ts +4 -4
- package/build/src/operators/mod.js +12 -12
- package/build/src/operators/multiply.d.ts +4 -4
- package/build/src/operators/multiply.js +29 -29
- package/build/src/operators/power.d.ts +4 -4
- package/build/src/operators/power.js +9 -9
- package/build/src/rfc.d.ts +25 -25
- package/build/src/rfc.js +2 -2
- package/build/src/statements/append.d.ts +13 -13
- package/build/src/statements/append.js +66 -66
- package/build/src/statements/assert.d.ts +1 -1
- package/build/src/statements/assert.js +9 -9
- package/build/src/statements/assign.d.ts +12 -12
- package/build/src/statements/assign.js +136 -136
- package/build/src/statements/call_function.d.ts +15 -15
- package/build/src/statements/call_function.js +35 -35
- package/build/src/statements/cast.d.ts +2 -2
- package/build/src/statements/cast.js +56 -56
- package/build/src/statements/clear.d.ts +4 -4
- package/build/src/statements/clear.js +7 -7
- package/build/src/statements/collect.d.ts +3 -3
- package/build/src/statements/collect.js +13 -13
- package/build/src/statements/commit.d.ts +1 -1
- package/build/src/statements/commit.js +7 -7
- package/build/src/statements/concatenate.d.ts +11 -11
- package/build/src/statements/concatenate.js +47 -47
- package/build/src/statements/condense.d.ts +4 -4
- package/build/src/statements/condense.js +15 -15
- package/build/src/statements/convert.d.ts +14 -14
- package/build/src/statements/convert.js +78 -78
- package/build/src/statements/create_data.d.ts +16 -16
- package/build/src/statements/create_data.js +154 -154
- package/build/src/statements/delete_database.d.ts +13 -13
- package/build/src/statements/delete_database.js +51 -51
- package/build/src/statements/delete_internal.d.ts +12 -12
- package/build/src/statements/delete_internal.js +106 -99
- package/build/src/statements/describe.d.ts +13 -13
- package/build/src/statements/describe.js +89 -89
- package/build/src/statements/find.d.ts +17 -17
- package/build/src/statements/find.js +173 -168
- package/build/src/statements/get_bit.d.ts +4 -4
- package/build/src/statements/get_bit.js +12 -12
- package/build/src/statements/get_locale.d.ts +2 -2
- package/build/src/statements/get_locale.js +8 -8
- package/build/src/statements/get_parameter.d.ts +2 -2
- package/build/src/statements/get_parameter.js +9 -9
- package/build/src/statements/get_run_time.d.ts +2 -2
- package/build/src/statements/get_run_time.js +16 -16
- package/build/src/statements/get_time.d.ts +9 -9
- package/build/src/statements/get_time.js +30 -30
- package/build/src/statements/index.d.ts +96 -96
- package/build/src/statements/index.js +115 -115
- package/build/src/statements/insert_database.d.ts +13 -13
- package/build/src/statements/insert_database.js +56 -56
- package/build/src/statements/insert_internal.d.ts +13 -13
- package/build/src/statements/insert_internal.js +113 -113
- package/build/src/statements/loop.d.ts +15 -15
- package/build/src/statements/loop.js +115 -115
- package/build/src/statements/message.d.ts +17 -17
- package/build/src/statements/message.js +89 -89
- package/build/src/statements/modify_database.d.ts +12 -12
- package/build/src/statements/modify_database.js +39 -39
- package/build/src/statements/modify_internal.d.ts +7 -7
- package/build/src/statements/modify_internal.js +29 -29
- package/build/src/statements/move_corresponding.d.ts +2 -2
- package/build/src/statements/move_corresponding.js +10 -10
- package/build/src/statements/overlay.d.ts +3 -3
- package/build/src/statements/overlay.js +16 -16
- package/build/src/statements/raise_event.d.ts +1 -1
- package/build/src/statements/raise_event.js +8 -8
- package/build/src/statements/read_report.d.ts +8 -8
- package/build/src/statements/read_report.js +14 -14
- package/build/src/statements/read_table.d.ts +22 -22
- package/build/src/statements/read_table.js +130 -130
- package/build/src/statements/replace.d.ts +13 -13
- package/build/src/statements/replace.js +60 -60
- package/build/src/statements/rollback.d.ts +1 -1
- package/build/src/statements/rollback.js +7 -7
- package/build/src/statements/select.d.ts +8 -8
- package/build/src/statements/select.js +77 -77
- package/build/src/statements/set_bit.d.ts +4 -4
- package/build/src/statements/set_bit.js +41 -41
- package/build/src/statements/set_handler.d.ts +3 -3
- package/build/src/statements/set_handler.js +8 -8
- package/build/src/statements/set_locale.d.ts +2 -2
- package/build/src/statements/set_locale.js +7 -7
- package/build/src/statements/shift.d.ts +12 -12
- package/build/src/statements/shift.js +113 -113
- package/build/src/statements/sort.d.ts +9 -9
- package/build/src/statements/sort.js +82 -82
- package/build/src/statements/split.d.ts +9 -9
- package/build/src/statements/split.js +38 -38
- package/build/src/statements/translate.d.ts +2 -2
- package/build/src/statements/translate.js +39 -39
- package/build/src/statements/update_database.d.ts +14 -14
- package/build/src/statements/update_database.js +53 -53
- package/build/src/statements/write.d.ts +17 -17
- package/build/src/statements/write.js +56 -56
- package/build/src/template_formatting.d.ts +14 -14
- package/build/src/template_formatting.js +82 -82
- package/build/src/throw_error.d.ts +1 -1
- package/build/src/throw_error.js +14 -14
- package/build/src/types/_abstract_type_data.d.ts +5 -5
- package/build/src/types/_abstract_type_data.js +2 -2
- package/build/src/types/_character.d.ts +11 -11
- package/build/src/types/_character.js +2 -2
- package/build/src/types/_date_helper.d.ts +2 -2
- package/build/src/types/_date_helper.js +40 -40
- package/build/src/types/_numeric.d.ts +5 -5
- package/build/src/types/_numeric.js +2 -2
- package/build/src/types/abap_object.d.ts +11 -11
- package/build/src/types/abap_object.js +32 -32
- package/build/src/types/character.d.ts +26 -26
- package/build/src/types/character.js +111 -111
- package/build/src/types/data_reference.d.ts +28 -28
- package/build/src/types/data_reference.js +88 -88
- package/build/src/types/date.d.ts +20 -20
- package/build/src/types/date.js +66 -66
- package/build/src/types/decfloat34.d.ts +11 -11
- package/build/src/types/decfloat34.js +45 -45
- package/build/src/types/field_symbol.d.ts +32 -32
- package/build/src/types/field_symbol.js +115 -115
- package/build/src/types/float.d.ts +15 -15
- package/build/src/types/float.js +74 -74
- package/build/src/types/hex.d.ts +20 -20
- package/build/src/types/hex.js +81 -81
- package/build/src/types/index.d.ts +17 -17
- package/build/src/types/index.js +33 -33
- package/build/src/types/integer.d.ts +15 -15
- package/build/src/types/integer.js +56 -56
- package/build/src/types/numc.d.ts +21 -21
- package/build/src/types/numc.js +48 -48
- package/build/src/types/packed.d.ts +19 -19
- package/build/src/types/packed.js +53 -53
- package/build/src/types/string.d.ts +19 -19
- package/build/src/types/string.js +86 -86
- package/build/src/types/structure.d.ts +23 -23
- package/build/src/types/structure.js +113 -113
- package/build/src/types/table.d.ts +55 -55
- package/build/src/types/table.js +220 -220
- package/build/src/types/time.d.ts +20 -20
- package/build/src/types/time.js +67 -67
- package/build/src/types/utc_long.d.ts +18 -18
- package/build/src/types/utc_long.js +26 -26
- package/build/src/types/xstring.d.ts +18 -18
- package/build/src/types/xstring.js +70 -70
- package/build/src/unit_test.d.ts +26 -26
- package/build/src/unit_test.js +75 -75
- package/package.json +2 -2
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.String = void 0;
|
|
4
|
-
const _parse_1 = require("../operators/_parse");
|
|
5
|
-
const throw_error_1 = require("../throw_error");
|
|
6
|
-
const character_1 = require("./character");
|
|
7
|
-
const field_symbol_1 = require("./field_symbol");
|
|
8
|
-
const integer_1 = require("./integer");
|
|
9
|
-
const packed_1 = require("./packed");
|
|
10
|
-
const structure_1 = require("./structure");
|
|
11
|
-
class String {
|
|
12
|
-
constructor(input) {
|
|
13
|
-
this.value = "";
|
|
14
|
-
this.qualifiedName = input === null || input === void 0 ? void 0 : input.qualifiedName;
|
|
15
|
-
}
|
|
16
|
-
getQualifiedName() {
|
|
17
|
-
return this.qualifiedName;
|
|
18
|
-
}
|
|
19
|
-
set(value) {
|
|
20
|
-
if (value instanceof field_symbol_1.FieldSymbol) {
|
|
21
|
-
if (value.getPointer() === undefined) {
|
|
22
|
-
throw new Error("GETWA_NOT_ASSIGNED");
|
|
23
|
-
}
|
|
24
|
-
return this.set(value.getPointer());
|
|
25
|
-
}
|
|
26
|
-
else if (typeof value === "string") {
|
|
27
|
-
this.value = value;
|
|
28
|
-
}
|
|
29
|
-
else if (typeof value === "number") {
|
|
30
|
-
this.value = value.toString();
|
|
31
|
-
}
|
|
32
|
-
else if (value instanceof character_1.Character) {
|
|
33
|
-
// replace trailing blanks if the source is a Character string
|
|
34
|
-
this.value = value.getTrimEnd();
|
|
35
|
-
}
|
|
36
|
-
else if (value instanceof structure_1.Structure) {
|
|
37
|
-
this.value = value.getCharacter();
|
|
38
|
-
}
|
|
39
|
-
else if (value instanceof packed_1.Packed) {
|
|
40
|
-
const lv_sign = value.get() >= 0 ? " " : "-";
|
|
41
|
-
this.value = Math.abs(value.get()).toFixed(value.getDecimals());
|
|
42
|
-
this.value += lv_sign;
|
|
43
|
-
}
|
|
44
|
-
else if (value instanceof integer_1.Integer) {
|
|
45
|
-
const lv_sign = value.get() >= 0 ? " " : "-";
|
|
46
|
-
this.value = Math.abs(value.get()) + "";
|
|
47
|
-
this.value += lv_sign;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.value = value.get() + "";
|
|
51
|
-
}
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
clear() {
|
|
55
|
-
this.value = "";
|
|
56
|
-
}
|
|
57
|
-
get() {
|
|
58
|
-
return this.value;
|
|
59
|
-
}
|
|
60
|
-
getOffset(input) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(0
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
ret = ret.substr(0,
|
|
80
|
-
}
|
|
81
|
-
const r = new String();
|
|
82
|
-
r.set(ret);
|
|
83
|
-
return r;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.String = String;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.String = void 0;
|
|
4
|
+
const _parse_1 = require("../operators/_parse");
|
|
5
|
+
const throw_error_1 = require("../throw_error");
|
|
6
|
+
const character_1 = require("./character");
|
|
7
|
+
const field_symbol_1 = require("./field_symbol");
|
|
8
|
+
const integer_1 = require("./integer");
|
|
9
|
+
const packed_1 = require("./packed");
|
|
10
|
+
const structure_1 = require("./structure");
|
|
11
|
+
class String {
|
|
12
|
+
constructor(input) {
|
|
13
|
+
this.value = "";
|
|
14
|
+
this.qualifiedName = input === null || input === void 0 ? void 0 : input.qualifiedName;
|
|
15
|
+
}
|
|
16
|
+
getQualifiedName() {
|
|
17
|
+
return this.qualifiedName;
|
|
18
|
+
}
|
|
19
|
+
set(value) {
|
|
20
|
+
if (value instanceof field_symbol_1.FieldSymbol) {
|
|
21
|
+
if (value.getPointer() === undefined) {
|
|
22
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
23
|
+
}
|
|
24
|
+
return this.set(value.getPointer());
|
|
25
|
+
}
|
|
26
|
+
else if (typeof value === "string") {
|
|
27
|
+
this.value = value;
|
|
28
|
+
}
|
|
29
|
+
else if (typeof value === "number") {
|
|
30
|
+
this.value = value.toString();
|
|
31
|
+
}
|
|
32
|
+
else if (value instanceof character_1.Character) {
|
|
33
|
+
// replace trailing blanks if the source is a Character string
|
|
34
|
+
this.value = value.getTrimEnd();
|
|
35
|
+
}
|
|
36
|
+
else if (value instanceof structure_1.Structure) {
|
|
37
|
+
this.value = value.getCharacter();
|
|
38
|
+
}
|
|
39
|
+
else if (value instanceof packed_1.Packed) {
|
|
40
|
+
const lv_sign = value.get() >= 0 ? " " : "-";
|
|
41
|
+
this.value = Math.abs(value.get()).toFixed(value.getDecimals());
|
|
42
|
+
this.value += lv_sign;
|
|
43
|
+
}
|
|
44
|
+
else if (value instanceof integer_1.Integer) {
|
|
45
|
+
const lv_sign = value.get() >= 0 ? " " : "-";
|
|
46
|
+
this.value = Math.abs(value.get()) + "";
|
|
47
|
+
this.value += lv_sign;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.value = value.get() + "";
|
|
51
|
+
}
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
clear() {
|
|
55
|
+
this.value = "";
|
|
56
|
+
}
|
|
57
|
+
get() {
|
|
58
|
+
return this.value;
|
|
59
|
+
}
|
|
60
|
+
getOffset(input) {
|
|
61
|
+
let offset = input === null || input === void 0 ? void 0 : input.offset;
|
|
62
|
+
if (offset) {
|
|
63
|
+
offset = (0, _parse_1.parse)(offset);
|
|
64
|
+
}
|
|
65
|
+
let length = input === null || input === void 0 ? void 0 : input.length;
|
|
66
|
+
if (length) {
|
|
67
|
+
length = (0, _parse_1.parse)(length);
|
|
68
|
+
}
|
|
69
|
+
if ((offset && offset > this.value.length)
|
|
70
|
+
|| (offset && offset < 0)
|
|
71
|
+
|| (length && length < 0)) {
|
|
72
|
+
(0, throw_error_1.throwError)("CX_SY_RANGE_OUT_OF_BOUNDS");
|
|
73
|
+
}
|
|
74
|
+
let ret = this.value;
|
|
75
|
+
if (offset) {
|
|
76
|
+
ret = ret.substr(offset);
|
|
77
|
+
}
|
|
78
|
+
if (length !== undefined) {
|
|
79
|
+
ret = ret.substr(0, length);
|
|
80
|
+
}
|
|
81
|
+
const r = new String();
|
|
82
|
+
r.set(ret);
|
|
83
|
+
return r;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.String = String;
|
|
87
87
|
//# sourceMappingURL=string.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { FieldSymbol } from "./field_symbol";
|
|
2
|
-
import { Table } from "./table";
|
|
3
|
-
import { ICharacter } from "./_character";
|
|
4
|
-
import { INumeric } from "./_numeric";
|
|
5
|
-
import { Hex } from "./hex";
|
|
6
|
-
import { Character } from "./character";
|
|
7
|
-
export declare class Structure {
|
|
8
|
-
private readonly value;
|
|
9
|
-
private readonly qualifiedName;
|
|
10
|
-
private readonly ddicName;
|
|
11
|
-
constructor(fields: any, qualifiedName?: string, ddicName?: string);
|
|
12
|
-
clear(): this;
|
|
13
|
-
getDDICName(): string | undefined;
|
|
14
|
-
getQualifiedName(): string | undefined;
|
|
15
|
-
set(input: Structure | string | INumeric | Table | ICharacter | FieldSymbol | undefined): this | undefined;
|
|
16
|
-
private setCharacter;
|
|
17
|
-
get(): any;
|
|
18
|
-
getCharacter(): string;
|
|
19
|
-
getOffset(input: {
|
|
20
|
-
offset?: number | INumeric | Hex;
|
|
21
|
-
length?: number | INumeric | Hex;
|
|
22
|
-
}): Character;
|
|
23
|
-
}
|
|
1
|
+
import { FieldSymbol } from "./field_symbol";
|
|
2
|
+
import { Table } from "./table";
|
|
3
|
+
import { ICharacter } from "./_character";
|
|
4
|
+
import { INumeric } from "./_numeric";
|
|
5
|
+
import { Hex } from "./hex";
|
|
6
|
+
import { Character } from "./character";
|
|
7
|
+
export declare class Structure {
|
|
8
|
+
private readonly value;
|
|
9
|
+
private readonly qualifiedName;
|
|
10
|
+
private readonly ddicName;
|
|
11
|
+
constructor(fields: any, qualifiedName?: string, ddicName?: string);
|
|
12
|
+
clear(): this;
|
|
13
|
+
getDDICName(): string | undefined;
|
|
14
|
+
getQualifiedName(): string | undefined;
|
|
15
|
+
set(input: Structure | string | INumeric | Table | ICharacter | FieldSymbol | undefined): this | undefined;
|
|
16
|
+
private setCharacter;
|
|
17
|
+
get(): any;
|
|
18
|
+
getCharacter(): string;
|
|
19
|
+
getOffset(input: {
|
|
20
|
+
offset?: number | INumeric | Hex;
|
|
21
|
+
length?: number | INumeric | Hex;
|
|
22
|
+
}): Character;
|
|
23
|
+
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Structure = void 0;
|
|
4
|
-
const clone_1 = require("../clone");
|
|
5
|
-
const field_symbol_1 = require("./field_symbol");
|
|
6
|
-
const table_1 = require("./table");
|
|
7
|
-
const _parse_1 = require("../operators/_parse");
|
|
8
|
-
const character_1 = require("./character");
|
|
9
|
-
const throw_error_1 = require("../throw_error");
|
|
10
|
-
class Structure {
|
|
11
|
-
constructor(fields, qualifiedName, ddicName) {
|
|
12
|
-
this.value = fields;
|
|
13
|
-
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
14
|
-
this.ddicName = ddicName === null || ddicName === void 0 ? void 0 : ddicName.toUpperCase();
|
|
15
|
-
}
|
|
16
|
-
clear() {
|
|
17
|
-
for (const f in this.value) {
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
this.value[f].clear();
|
|
20
|
-
}
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
getDDICName() {
|
|
24
|
-
return this.ddicName;
|
|
25
|
-
}
|
|
26
|
-
getQualifiedName() {
|
|
27
|
-
return this.qualifiedName;
|
|
28
|
-
}
|
|
29
|
-
set(input) {
|
|
30
|
-
if (input === undefined) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (input instanceof field_symbol_1.FieldSymbol) {
|
|
34
|
-
this.set(input.getPointer());
|
|
35
|
-
}
|
|
36
|
-
else if (input instanceof table_1.Table) {
|
|
37
|
-
throw "Structure, input is a table";
|
|
38
|
-
}
|
|
39
|
-
else if (input instanceof Structure) {
|
|
40
|
-
const obj = input.get();
|
|
41
|
-
const keys1 = Object.keys(obj);
|
|
42
|
-
const keys2 = Object.keys(this.value);
|
|
43
|
-
/*
|
|
44
|
-
console.dir(keys1);
|
|
45
|
-
console.dir(keys2);
|
|
46
|
-
*/
|
|
47
|
-
for (let i = 0; i < keys1.length; i++) {
|
|
48
|
-
const key1 = keys1[i];
|
|
49
|
-
const key2 = keys2[i];
|
|
50
|
-
this.value[key2].set((0, clone_1.clone)(obj[key1]));
|
|
51
|
-
}
|
|
52
|
-
/*
|
|
53
|
-
for (const f in obj) {
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
this.value[f].set(clone(obj[f]));
|
|
56
|
-
}
|
|
57
|
-
*/
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
this.setCharacter(input);
|
|
61
|
-
}
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
setCharacter(input) {
|
|
65
|
-
this.clear();
|
|
66
|
-
let val = input;
|
|
67
|
-
if (typeof val !== "string") {
|
|
68
|
-
val = val.get() + "";
|
|
69
|
-
}
|
|
70
|
-
for (const key of Object.keys(this.value)) {
|
|
71
|
-
const targetLength = this.value[key].getLength();
|
|
72
|
-
this.value[key].set(val.substr(0, targetLength));
|
|
73
|
-
val = val.substr(targetLength);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
get() {
|
|
77
|
-
return this.value;
|
|
78
|
-
}
|
|
79
|
-
getCharacter() {
|
|
80
|
-
let val = "";
|
|
81
|
-
for (const v in this.value) {
|
|
82
|
-
val += this.value[v].get();
|
|
83
|
-
}
|
|
84
|
-
return val;
|
|
85
|
-
}
|
|
86
|
-
getOffset(input) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
(0
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
ret = ret.substr(0,
|
|
107
|
-
}
|
|
108
|
-
const r = new character_1.Character(ret.length);
|
|
109
|
-
r.set(ret);
|
|
110
|
-
return r;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.Structure = Structure;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Structure = void 0;
|
|
4
|
+
const clone_1 = require("../clone");
|
|
5
|
+
const field_symbol_1 = require("./field_symbol");
|
|
6
|
+
const table_1 = require("./table");
|
|
7
|
+
const _parse_1 = require("../operators/_parse");
|
|
8
|
+
const character_1 = require("./character");
|
|
9
|
+
const throw_error_1 = require("../throw_error");
|
|
10
|
+
class Structure {
|
|
11
|
+
constructor(fields, qualifiedName, ddicName) {
|
|
12
|
+
this.value = fields;
|
|
13
|
+
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
14
|
+
this.ddicName = ddicName === null || ddicName === void 0 ? void 0 : ddicName.toUpperCase();
|
|
15
|
+
}
|
|
16
|
+
clear() {
|
|
17
|
+
for (const f in this.value) {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
this.value[f].clear();
|
|
20
|
+
}
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
getDDICName() {
|
|
24
|
+
return this.ddicName;
|
|
25
|
+
}
|
|
26
|
+
getQualifiedName() {
|
|
27
|
+
return this.qualifiedName;
|
|
28
|
+
}
|
|
29
|
+
set(input) {
|
|
30
|
+
if (input === undefined) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (input instanceof field_symbol_1.FieldSymbol) {
|
|
34
|
+
this.set(input.getPointer());
|
|
35
|
+
}
|
|
36
|
+
else if (input instanceof table_1.Table) {
|
|
37
|
+
throw "Structure, input is a table";
|
|
38
|
+
}
|
|
39
|
+
else if (input instanceof Structure) {
|
|
40
|
+
const obj = input.get();
|
|
41
|
+
const keys1 = Object.keys(obj);
|
|
42
|
+
const keys2 = Object.keys(this.value);
|
|
43
|
+
/*
|
|
44
|
+
console.dir(keys1);
|
|
45
|
+
console.dir(keys2);
|
|
46
|
+
*/
|
|
47
|
+
for (let i = 0; i < keys1.length; i++) {
|
|
48
|
+
const key1 = keys1[i];
|
|
49
|
+
const key2 = keys2[i];
|
|
50
|
+
this.value[key2].set((0, clone_1.clone)(obj[key1]));
|
|
51
|
+
}
|
|
52
|
+
/*
|
|
53
|
+
for (const f in obj) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
this.value[f].set(clone(obj[f]));
|
|
56
|
+
}
|
|
57
|
+
*/
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.setCharacter(input);
|
|
61
|
+
}
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
setCharacter(input) {
|
|
65
|
+
this.clear();
|
|
66
|
+
let val = input;
|
|
67
|
+
if (typeof val !== "string") {
|
|
68
|
+
val = val.get() + "";
|
|
69
|
+
}
|
|
70
|
+
for (const key of Object.keys(this.value)) {
|
|
71
|
+
const targetLength = this.value[key].getLength();
|
|
72
|
+
this.value[key].set(val.substr(0, targetLength));
|
|
73
|
+
val = val.substr(targetLength);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
get() {
|
|
77
|
+
return this.value;
|
|
78
|
+
}
|
|
79
|
+
getCharacter() {
|
|
80
|
+
let val = "";
|
|
81
|
+
for (const v in this.value) {
|
|
82
|
+
val += this.value[v].get();
|
|
83
|
+
}
|
|
84
|
+
return val;
|
|
85
|
+
}
|
|
86
|
+
getOffset(input) {
|
|
87
|
+
let offset = input === null || input === void 0 ? void 0 : input.offset;
|
|
88
|
+
if (offset) {
|
|
89
|
+
offset = (0, _parse_1.parse)(offset);
|
|
90
|
+
}
|
|
91
|
+
let length = input === null || input === void 0 ? void 0 : input.length;
|
|
92
|
+
if (length) {
|
|
93
|
+
length = (0, _parse_1.parse)(length);
|
|
94
|
+
}
|
|
95
|
+
const val = this.getCharacter();
|
|
96
|
+
if ((offset && offset >= val.length)
|
|
97
|
+
|| (offset && offset < 0)
|
|
98
|
+
|| (length && length < 0)) {
|
|
99
|
+
(0, throw_error_1.throwError)("CX_SY_RANGE_OUT_OF_BOUNDS");
|
|
100
|
+
}
|
|
101
|
+
let ret = val;
|
|
102
|
+
if (offset) {
|
|
103
|
+
ret = ret.substr(offset);
|
|
104
|
+
}
|
|
105
|
+
if (length !== undefined) {
|
|
106
|
+
ret = ret.substr(0, length);
|
|
107
|
+
}
|
|
108
|
+
const r = new character_1.Character(ret.length);
|
|
109
|
+
r.set(ret);
|
|
110
|
+
return r;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.Structure = Structure;
|
|
114
114
|
//# sourceMappingURL=structure.js.map
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { INumeric } from "./_numeric";
|
|
2
|
-
import { ICharacter } from "./_character";
|
|
3
|
-
import { ABAPObject } from "./abap_object";
|
|
4
|
-
import { Structure } from "./structure";
|
|
5
|
-
export declare enum TableAccessType {
|
|
6
|
-
standard = "STANDARD",
|
|
7
|
-
sorted = "SORTED",
|
|
8
|
-
hashed = "HASHED",
|
|
9
|
-
index = "INDEX",
|
|
10
|
-
any = "ANY"
|
|
11
|
-
}
|
|
12
|
-
export declare class LoopIndex {
|
|
13
|
-
index: number;
|
|
14
|
-
constructor(start: number);
|
|
15
|
-
}
|
|
16
|
-
export
|
|
17
|
-
name: string;
|
|
18
|
-
type?: TableAccessType;
|
|
19
|
-
keyFields: string[];
|
|
20
|
-
isUnique: boolean;
|
|
21
|
-
};
|
|
22
|
-
export
|
|
23
|
-
withHeader: boolean;
|
|
24
|
-
primaryKey?: ITableKey;
|
|
25
|
-
secondary?: ITableKey[];
|
|
26
|
-
};
|
|
27
|
-
export
|
|
28
|
-
export declare class Table {
|
|
29
|
-
private value;
|
|
30
|
-
private readonly header;
|
|
31
|
-
private readonly rowType;
|
|
32
|
-
private readonly loops;
|
|
33
|
-
private readonly options;
|
|
34
|
-
private readonly qualifiedName;
|
|
35
|
-
private readonly isStructured;
|
|
36
|
-
private secondaryIndexes;
|
|
37
|
-
constructor(rowType: TableRowType, options?: ITableOptions, qualifiedName?: string);
|
|
38
|
-
getKeyByName(name: string): ITableKey | undefined;
|
|
39
|
-
getSecondaryIndex(name: string): TableRowType[];
|
|
40
|
-
getQualifiedName(): string | undefined;
|
|
41
|
-
getOptions(): ITableOptions | undefined;
|
|
42
|
-
startLoop(start?: number): LoopIndex;
|
|
43
|
-
unregisterLoop(loop: LoopIndex): void;
|
|
44
|
-
getRowType(): TableRowType;
|
|
45
|
-
array(): readonly any[];
|
|
46
|
-
clear(): void;
|
|
47
|
-
set(tab: Table | TableRowType): void;
|
|
48
|
-
getHeader(): TableRowType;
|
|
49
|
-
insertIndex(item: TableRowType, index: number): any;
|
|
50
|
-
deleteIndex(index: number): void;
|
|
51
|
-
append(item: TableRowType): any;
|
|
52
|
-
appendInitial(): TableRowType;
|
|
53
|
-
sort(compareFn: (a: TableRowType, b: TableRowType) => number): void;
|
|
54
|
-
private getValue;
|
|
55
|
-
}
|
|
1
|
+
import { INumeric } from "./_numeric";
|
|
2
|
+
import { ICharacter } from "./_character";
|
|
3
|
+
import { ABAPObject } from "./abap_object";
|
|
4
|
+
import { Structure } from "./structure";
|
|
5
|
+
export declare enum TableAccessType {
|
|
6
|
+
standard = "STANDARD",
|
|
7
|
+
sorted = "SORTED",
|
|
8
|
+
hashed = "HASHED",
|
|
9
|
+
index = "INDEX",
|
|
10
|
+
any = "ANY"
|
|
11
|
+
}
|
|
12
|
+
export declare class LoopIndex {
|
|
13
|
+
index: number;
|
|
14
|
+
constructor(start: number);
|
|
15
|
+
}
|
|
16
|
+
export type ITableKey = {
|
|
17
|
+
name: string;
|
|
18
|
+
type?: TableAccessType;
|
|
19
|
+
keyFields: string[];
|
|
20
|
+
isUnique: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type ITableOptions = {
|
|
23
|
+
withHeader: boolean;
|
|
24
|
+
primaryKey?: ITableKey;
|
|
25
|
+
secondary?: ITableKey[];
|
|
26
|
+
};
|
|
27
|
+
export type TableRowType = INumeric | Structure | ICharacter | Table | ABAPObject;
|
|
28
|
+
export declare class Table {
|
|
29
|
+
private value;
|
|
30
|
+
private readonly header;
|
|
31
|
+
private readonly rowType;
|
|
32
|
+
private readonly loops;
|
|
33
|
+
private readonly options;
|
|
34
|
+
private readonly qualifiedName;
|
|
35
|
+
private readonly isStructured;
|
|
36
|
+
private secondaryIndexes;
|
|
37
|
+
constructor(rowType: TableRowType, options?: ITableOptions, qualifiedName?: string);
|
|
38
|
+
getKeyByName(name: string): ITableKey | undefined;
|
|
39
|
+
getSecondaryIndex(name: string): TableRowType[];
|
|
40
|
+
getQualifiedName(): string | undefined;
|
|
41
|
+
getOptions(): ITableOptions | undefined;
|
|
42
|
+
startLoop(start?: number): LoopIndex;
|
|
43
|
+
unregisterLoop(loop: LoopIndex): void;
|
|
44
|
+
getRowType(): TableRowType;
|
|
45
|
+
array(): readonly any[];
|
|
46
|
+
clear(): void;
|
|
47
|
+
set(tab: Table | TableRowType): void;
|
|
48
|
+
getHeader(): TableRowType;
|
|
49
|
+
insertIndex(item: TableRowType, index: number): any;
|
|
50
|
+
deleteIndex(index: number): void;
|
|
51
|
+
append(item: TableRowType): any;
|
|
52
|
+
appendInitial(): TableRowType;
|
|
53
|
+
sort(compareFn: (a: TableRowType, b: TableRowType) => number): void;
|
|
54
|
+
private getValue;
|
|
55
|
+
}
|