@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
package/build/src/types/table.js
CHANGED
|
@@ -1,221 +1,221 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Table = exports.LoopIndex = exports.TableAccessType = void 0;
|
|
4
|
-
const integer_1 = require("./integer");
|
|
5
|
-
const string_1 = require("./string");
|
|
6
|
-
const clone_1 = require("../clone");
|
|
7
|
-
const structure_1 = require("./structure");
|
|
8
|
-
const field_symbol_1 = require("./field_symbol");
|
|
9
|
-
const data_reference_1 = require("./data_reference");
|
|
10
|
-
const insert_internal_1 = require("../statements/insert_internal");
|
|
11
|
-
const sort_1 = require("../statements/sort");
|
|
12
|
-
var TableAccessType;
|
|
13
|
-
(function (TableAccessType) {
|
|
14
|
-
TableAccessType["standard"] = "STANDARD";
|
|
15
|
-
TableAccessType["sorted"] = "SORTED";
|
|
16
|
-
TableAccessType["hashed"] = "HASHED";
|
|
17
|
-
TableAccessType["index"] = "INDEX";
|
|
18
|
-
TableAccessType["any"] = "ANY";
|
|
19
|
-
})(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));
|
|
20
|
-
class LoopIndex {
|
|
21
|
-
constructor(start) {
|
|
22
|
-
this.index = start;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.LoopIndex = LoopIndex;
|
|
26
|
-
class Table {
|
|
27
|
-
constructor(rowType, options, qualifiedName) {
|
|
28
|
-
this.value = [];
|
|
29
|
-
this.secondaryIndexes = {};
|
|
30
|
-
this.loops = new Set();
|
|
31
|
-
this.rowType = rowType;
|
|
32
|
-
this.options = options;
|
|
33
|
-
this.isStructured = rowType instanceof structure_1.Structure;
|
|
34
|
-
if ((options === null || options === void 0 ? void 0 : options.withHeader) === true) {
|
|
35
|
-
this.header = (0, clone_1.clone)(this.rowType);
|
|
36
|
-
}
|
|
37
|
-
if (this.options === undefined) {
|
|
38
|
-
this.options = {
|
|
39
|
-
primaryKey: {
|
|
40
|
-
name: "primary_key",
|
|
41
|
-
type: TableAccessType.standard,
|
|
42
|
-
keyFields: [],
|
|
43
|
-
isUnique: false,
|
|
44
|
-
},
|
|
45
|
-
withHeader: false,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
49
|
-
}
|
|
50
|
-
getKeyByName(name) {
|
|
51
|
-
var _a, _b;
|
|
52
|
-
return (_b = (_a = this.getOptions()) === null || _a === void 0 ? void 0 : _a.secondary) === null || _b === void 0 ? void 0 : _b.find(s => s.name.toUpperCase() === name.toUpperCase());
|
|
53
|
-
}
|
|
54
|
-
getSecondaryIndex(name) {
|
|
55
|
-
if (this.secondaryIndexes[name.toUpperCase()]) {
|
|
56
|
-
return this.secondaryIndexes[name.toUpperCase()];
|
|
57
|
-
}
|
|
58
|
-
const secondary = this.getKeyByName(name);
|
|
59
|
-
if (secondary === undefined) {
|
|
60
|
-
throw `Table, secondary key "${name}" not found`;
|
|
61
|
-
}
|
|
62
|
-
const copy = (0, clone_1.clone)(this.value);
|
|
63
|
-
(0, sort_1.sort)(copy, { by: secondary.keyFields.map(k => { return { component: k.toLowerCase() }; }) });
|
|
64
|
-
this.secondaryIndexes[name.toUpperCase()] = copy;
|
|
65
|
-
return copy;
|
|
66
|
-
}
|
|
67
|
-
getQualifiedName() {
|
|
68
|
-
return this.qualifiedName;
|
|
69
|
-
}
|
|
70
|
-
getOptions() {
|
|
71
|
-
return this.options;
|
|
72
|
-
}
|
|
73
|
-
startLoop(start = 0) {
|
|
74
|
-
const l = new LoopIndex(start);
|
|
75
|
-
this.loops.add(l);
|
|
76
|
-
return l;
|
|
77
|
-
}
|
|
78
|
-
unregisterLoop(loop) {
|
|
79
|
-
this.loops.delete(loop);
|
|
80
|
-
}
|
|
81
|
-
getRowType() {
|
|
82
|
-
return this.rowType;
|
|
83
|
-
}
|
|
84
|
-
// Modifications to the array must be done inside this class, in order to keep track of LOOP indexes
|
|
85
|
-
array() {
|
|
86
|
-
return this.value;
|
|
87
|
-
}
|
|
88
|
-
clear() {
|
|
89
|
-
this.value = [];
|
|
90
|
-
this.secondaryIndexes = {};
|
|
91
|
-
}
|
|
92
|
-
set(tab) {
|
|
93
|
-
var _a, _b;
|
|
94
|
-
this.secondaryIndexes = {};
|
|
95
|
-
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.withHeader) === true) {
|
|
96
|
-
(_b = this.header) === null || _b === void 0 ? void 0 : _b.set(tab);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
if (!(tab instanceof Table) && !(tab instanceof field_symbol_1.FieldSymbol)) {
|
|
100
|
-
throw "Table, set error";
|
|
101
|
-
}
|
|
102
|
-
this.clear();
|
|
103
|
-
if (tab instanceof field_symbol_1.FieldSymbol) {
|
|
104
|
-
tab = tab.getPointer();
|
|
105
|
-
}
|
|
106
|
-
// this clones the values, and add sorting if required
|
|
107
|
-
(0, insert_internal_1.insertInternal)({ table: this, data: tab, lines: true });
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
getHeader() {
|
|
111
|
-
if (this.header === undefined) {
|
|
112
|
-
throw "table, getHeader";
|
|
113
|
-
}
|
|
114
|
-
return this.header;
|
|
115
|
-
}
|
|
116
|
-
insertIndex(item, index) {
|
|
117
|
-
this.secondaryIndexes = {};
|
|
118
|
-
if (item instanceof field_symbol_1.FieldSymbol) {
|
|
119
|
-
const p = item.getPointer();
|
|
120
|
-
if (p === undefined) {
|
|
121
|
-
throw new Error("insertIndex, fs not assigned");
|
|
122
|
-
}
|
|
123
|
-
this.insertIndex(p, index);
|
|
124
|
-
return p;
|
|
125
|
-
}
|
|
126
|
-
const val = this.getValue(item);
|
|
127
|
-
if (index === 0) {
|
|
128
|
-
this.value.unshift(val);
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
this.value.splice(index, 0, val);
|
|
132
|
-
}
|
|
133
|
-
for (const l of this.loops.values()) {
|
|
134
|
-
if (l.index <= index) {
|
|
135
|
-
l.index++;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return val;
|
|
139
|
-
}
|
|
140
|
-
deleteIndex(index) {
|
|
141
|
-
this.secondaryIndexes = {};
|
|
142
|
-
if (index > this.value.length) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (index === this.value.length - 1) {
|
|
146
|
-
this.value.pop(); // pop'ing is faster than splice
|
|
147
|
-
}
|
|
148
|
-
else if (index === 0) {
|
|
149
|
-
this.value.shift();
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
this.value.splice(index, 1);
|
|
153
|
-
}
|
|
154
|
-
for (const l of this.loops.values()) {
|
|
155
|
-
if (l.index >= index) {
|
|
156
|
-
l.index--;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
append(item) {
|
|
161
|
-
this.secondaryIndexes = {};
|
|
162
|
-
if (item instanceof field_symbol_1.FieldSymbol) {
|
|
163
|
-
const p = item.getPointer();
|
|
164
|
-
if (p === undefined) {
|
|
165
|
-
throw new Error("APPEND, fs not assigned");
|
|
166
|
-
}
|
|
167
|
-
this.append(p);
|
|
168
|
-
return p;
|
|
169
|
-
}
|
|
170
|
-
else if (item instanceof data_reference_1.DataReference) {
|
|
171
|
-
const ref = new data_reference_1.DataReference(item.getType());
|
|
172
|
-
ref.assign(item.getPointer());
|
|
173
|
-
this.value.push(ref);
|
|
174
|
-
return ref;
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
const val = this.getValue(item);
|
|
178
|
-
this.value.push(val);
|
|
179
|
-
return val;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
appendInitial() {
|
|
183
|
-
this.secondaryIndexes = {};
|
|
184
|
-
// note that this will clone the object
|
|
185
|
-
this.append(this.rowType);
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
abap.builtin.sy.get().tabix.set(this.value.length);
|
|
188
|
-
return this.value[this.value.length - 1];
|
|
189
|
-
}
|
|
190
|
-
sort(compareFn) {
|
|
191
|
-
this.value.sort(compareFn);
|
|
192
|
-
}
|
|
193
|
-
///////////////////////////
|
|
194
|
-
getValue(item) {
|
|
195
|
-
// make sure to do conversion if needed
|
|
196
|
-
if (typeof item === "number") {
|
|
197
|
-
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
198
|
-
tmp.set(new integer_1.Integer().set(item));
|
|
199
|
-
return tmp;
|
|
200
|
-
}
|
|
201
|
-
else if (typeof item === "string") {
|
|
202
|
-
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
203
|
-
tmp.set(new string_1.String().set(item));
|
|
204
|
-
return tmp;
|
|
205
|
-
// @ts-ignore
|
|
206
|
-
// eslint-disable-next-line max-len
|
|
207
|
-
}
|
|
208
|
-
else if (this.isStructured === true && item.getQualifiedName && this.rowType.getQualifiedName && item.getQualifiedName() !== "" && item.getQualifiedName() === this.rowType.getQualifiedName()) {
|
|
209
|
-
// types match, so no need to do conversions, just clone the item
|
|
210
|
-
const val = (0, clone_1.clone)(item);
|
|
211
|
-
return val;
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
215
|
-
tmp.set(item);
|
|
216
|
-
return tmp;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
exports.Table = Table;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Table = exports.LoopIndex = exports.TableAccessType = void 0;
|
|
4
|
+
const integer_1 = require("./integer");
|
|
5
|
+
const string_1 = require("./string");
|
|
6
|
+
const clone_1 = require("../clone");
|
|
7
|
+
const structure_1 = require("./structure");
|
|
8
|
+
const field_symbol_1 = require("./field_symbol");
|
|
9
|
+
const data_reference_1 = require("./data_reference");
|
|
10
|
+
const insert_internal_1 = require("../statements/insert_internal");
|
|
11
|
+
const sort_1 = require("../statements/sort");
|
|
12
|
+
var TableAccessType;
|
|
13
|
+
(function (TableAccessType) {
|
|
14
|
+
TableAccessType["standard"] = "STANDARD";
|
|
15
|
+
TableAccessType["sorted"] = "SORTED";
|
|
16
|
+
TableAccessType["hashed"] = "HASHED";
|
|
17
|
+
TableAccessType["index"] = "INDEX";
|
|
18
|
+
TableAccessType["any"] = "ANY";
|
|
19
|
+
})(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));
|
|
20
|
+
class LoopIndex {
|
|
21
|
+
constructor(start) {
|
|
22
|
+
this.index = start;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.LoopIndex = LoopIndex;
|
|
26
|
+
class Table {
|
|
27
|
+
constructor(rowType, options, qualifiedName) {
|
|
28
|
+
this.value = [];
|
|
29
|
+
this.secondaryIndexes = {};
|
|
30
|
+
this.loops = new Set();
|
|
31
|
+
this.rowType = rowType;
|
|
32
|
+
this.options = options;
|
|
33
|
+
this.isStructured = rowType instanceof structure_1.Structure;
|
|
34
|
+
if ((options === null || options === void 0 ? void 0 : options.withHeader) === true) {
|
|
35
|
+
this.header = (0, clone_1.clone)(this.rowType);
|
|
36
|
+
}
|
|
37
|
+
if (this.options === undefined) {
|
|
38
|
+
this.options = {
|
|
39
|
+
primaryKey: {
|
|
40
|
+
name: "primary_key",
|
|
41
|
+
type: TableAccessType.standard,
|
|
42
|
+
keyFields: [],
|
|
43
|
+
isUnique: false,
|
|
44
|
+
},
|
|
45
|
+
withHeader: false,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
49
|
+
}
|
|
50
|
+
getKeyByName(name) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
return (_b = (_a = this.getOptions()) === null || _a === void 0 ? void 0 : _a.secondary) === null || _b === void 0 ? void 0 : _b.find(s => s.name.toUpperCase() === name.toUpperCase());
|
|
53
|
+
}
|
|
54
|
+
getSecondaryIndex(name) {
|
|
55
|
+
if (this.secondaryIndexes[name.toUpperCase()]) {
|
|
56
|
+
return this.secondaryIndexes[name.toUpperCase()];
|
|
57
|
+
}
|
|
58
|
+
const secondary = this.getKeyByName(name);
|
|
59
|
+
if (secondary === undefined) {
|
|
60
|
+
throw `Table, secondary key "${name}" not found`;
|
|
61
|
+
}
|
|
62
|
+
const copy = (0, clone_1.clone)(this.value);
|
|
63
|
+
(0, sort_1.sort)(copy, { by: secondary.keyFields.map(k => { return { component: k.toLowerCase() }; }) });
|
|
64
|
+
this.secondaryIndexes[name.toUpperCase()] = copy;
|
|
65
|
+
return copy;
|
|
66
|
+
}
|
|
67
|
+
getQualifiedName() {
|
|
68
|
+
return this.qualifiedName;
|
|
69
|
+
}
|
|
70
|
+
getOptions() {
|
|
71
|
+
return this.options;
|
|
72
|
+
}
|
|
73
|
+
startLoop(start = 0) {
|
|
74
|
+
const l = new LoopIndex(start);
|
|
75
|
+
this.loops.add(l);
|
|
76
|
+
return l;
|
|
77
|
+
}
|
|
78
|
+
unregisterLoop(loop) {
|
|
79
|
+
this.loops.delete(loop);
|
|
80
|
+
}
|
|
81
|
+
getRowType() {
|
|
82
|
+
return this.rowType;
|
|
83
|
+
}
|
|
84
|
+
// Modifications to the array must be done inside this class, in order to keep track of LOOP indexes
|
|
85
|
+
array() {
|
|
86
|
+
return this.value;
|
|
87
|
+
}
|
|
88
|
+
clear() {
|
|
89
|
+
this.value = [];
|
|
90
|
+
this.secondaryIndexes = {};
|
|
91
|
+
}
|
|
92
|
+
set(tab) {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
this.secondaryIndexes = {};
|
|
95
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.withHeader) === true) {
|
|
96
|
+
(_b = this.header) === null || _b === void 0 ? void 0 : _b.set(tab);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (!(tab instanceof Table) && !(tab instanceof field_symbol_1.FieldSymbol)) {
|
|
100
|
+
throw "Table, set error";
|
|
101
|
+
}
|
|
102
|
+
this.clear();
|
|
103
|
+
if (tab instanceof field_symbol_1.FieldSymbol) {
|
|
104
|
+
tab = tab.getPointer();
|
|
105
|
+
}
|
|
106
|
+
// this clones the values, and add sorting if required
|
|
107
|
+
(0, insert_internal_1.insertInternal)({ table: this, data: tab, lines: true });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
getHeader() {
|
|
111
|
+
if (this.header === undefined) {
|
|
112
|
+
throw "table, getHeader";
|
|
113
|
+
}
|
|
114
|
+
return this.header;
|
|
115
|
+
}
|
|
116
|
+
insertIndex(item, index) {
|
|
117
|
+
this.secondaryIndexes = {};
|
|
118
|
+
if (item instanceof field_symbol_1.FieldSymbol) {
|
|
119
|
+
const p = item.getPointer();
|
|
120
|
+
if (p === undefined) {
|
|
121
|
+
throw new Error("insertIndex, fs not assigned");
|
|
122
|
+
}
|
|
123
|
+
this.insertIndex(p, index);
|
|
124
|
+
return p;
|
|
125
|
+
}
|
|
126
|
+
const val = this.getValue(item);
|
|
127
|
+
if (index === 0) {
|
|
128
|
+
this.value.unshift(val);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this.value.splice(index, 0, val);
|
|
132
|
+
}
|
|
133
|
+
for (const l of this.loops.values()) {
|
|
134
|
+
if (l.index <= index) {
|
|
135
|
+
l.index++;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return val;
|
|
139
|
+
}
|
|
140
|
+
deleteIndex(index) {
|
|
141
|
+
this.secondaryIndexes = {};
|
|
142
|
+
if (index > this.value.length) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (index === this.value.length - 1) {
|
|
146
|
+
this.value.pop(); // pop'ing is faster than splice
|
|
147
|
+
}
|
|
148
|
+
else if (index === 0) {
|
|
149
|
+
this.value.shift();
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.value.splice(index, 1);
|
|
153
|
+
}
|
|
154
|
+
for (const l of this.loops.values()) {
|
|
155
|
+
if (l.index >= index) {
|
|
156
|
+
l.index--;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
append(item) {
|
|
161
|
+
this.secondaryIndexes = {};
|
|
162
|
+
if (item instanceof field_symbol_1.FieldSymbol) {
|
|
163
|
+
const p = item.getPointer();
|
|
164
|
+
if (p === undefined) {
|
|
165
|
+
throw new Error("APPEND, fs not assigned");
|
|
166
|
+
}
|
|
167
|
+
this.append(p);
|
|
168
|
+
return p;
|
|
169
|
+
}
|
|
170
|
+
else if (item instanceof data_reference_1.DataReference) {
|
|
171
|
+
const ref = new data_reference_1.DataReference(item.getType());
|
|
172
|
+
ref.assign(item.getPointer());
|
|
173
|
+
this.value.push(ref);
|
|
174
|
+
return ref;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
const val = this.getValue(item);
|
|
178
|
+
this.value.push(val);
|
|
179
|
+
return val;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
appendInitial() {
|
|
183
|
+
this.secondaryIndexes = {};
|
|
184
|
+
// note that this will clone the object
|
|
185
|
+
this.append(this.rowType);
|
|
186
|
+
// @ts-ignore
|
|
187
|
+
abap.builtin.sy.get().tabix.set(this.value.length);
|
|
188
|
+
return this.value[this.value.length - 1];
|
|
189
|
+
}
|
|
190
|
+
sort(compareFn) {
|
|
191
|
+
this.value.sort(compareFn);
|
|
192
|
+
}
|
|
193
|
+
///////////////////////////
|
|
194
|
+
getValue(item) {
|
|
195
|
+
// make sure to do conversion if needed
|
|
196
|
+
if (typeof item === "number") {
|
|
197
|
+
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
198
|
+
tmp.set(new integer_1.Integer().set(item));
|
|
199
|
+
return tmp;
|
|
200
|
+
}
|
|
201
|
+
else if (typeof item === "string") {
|
|
202
|
+
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
203
|
+
tmp.set(new string_1.String().set(item));
|
|
204
|
+
return tmp;
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
// eslint-disable-next-line max-len
|
|
207
|
+
}
|
|
208
|
+
else if (this.isStructured === true && item.getQualifiedName && this.rowType.getQualifiedName && item.getQualifiedName() !== "" && item.getQualifiedName() === this.rowType.getQualifiedName()) {
|
|
209
|
+
// types match, so no need to do conversions, just clone the item
|
|
210
|
+
const val = (0, clone_1.clone)(item);
|
|
211
|
+
return val;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
215
|
+
tmp.set(item);
|
|
216
|
+
return tmp;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
exports.Table = Table;
|
|
221
221
|
//# sourceMappingURL=table.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Hex } from "./hex";
|
|
2
|
-
import { ICharacter } from "./_character";
|
|
3
|
-
import { INumeric } from "./_numeric";
|
|
4
|
-
import { String } from "./string";
|
|
5
|
-
export declare class Time implements ICharacter {
|
|
6
|
-
private value;
|
|
7
|
-
private readonly qualifiedName;
|
|
8
|
-
constructor(input?: {
|
|
9
|
-
qualifiedName?: string;
|
|
10
|
-
});
|
|
11
|
-
getQualifiedName(): string | undefined;
|
|
12
|
-
set(value: INumeric | ICharacter | Hex | string | number): this;
|
|
13
|
-
clear(): void;
|
|
14
|
-
get(): string;
|
|
15
|
-
getNumeric(): number;
|
|
16
|
-
getOffset(input: {
|
|
17
|
-
offset?: number | INumeric | Hex;
|
|
18
|
-
length?: number | INumeric | Hex;
|
|
19
|
-
}): String;
|
|
20
|
-
}
|
|
1
|
+
import { Hex } from "./hex";
|
|
2
|
+
import { ICharacter } from "./_character";
|
|
3
|
+
import { INumeric } from "./_numeric";
|
|
4
|
+
import { String } from "./string";
|
|
5
|
+
export declare class Time implements ICharacter {
|
|
6
|
+
private value;
|
|
7
|
+
private readonly qualifiedName;
|
|
8
|
+
constructor(input?: {
|
|
9
|
+
qualifiedName?: string;
|
|
10
|
+
});
|
|
11
|
+
getQualifiedName(): string | undefined;
|
|
12
|
+
set(value: INumeric | ICharacter | Hex | string | number): this;
|
|
13
|
+
clear(): void;
|
|
14
|
+
get(): string;
|
|
15
|
+
getNumeric(): number;
|
|
16
|
+
getOffset(input: {
|
|
17
|
+
offset?: number | INumeric | Hex;
|
|
18
|
+
length?: number | INumeric | Hex;
|
|
19
|
+
}): String;
|
|
20
|
+
}
|
package/build/src/types/time.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Time = void 0;
|
|
4
|
-
const string_1 = require("./string");
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
const _parse_1 = require("../operators/_parse");
|
|
7
|
-
class Time {
|
|
8
|
-
constructor(input) {
|
|
9
|
-
this.clear();
|
|
10
|
-
this.qualifiedName = input === null || input === void 0 ? void 0 : input.qualifiedName;
|
|
11
|
-
}
|
|
12
|
-
getQualifiedName() {
|
|
13
|
-
return this.qualifiedName;
|
|
14
|
-
}
|
|
15
|
-
set(value) {
|
|
16
|
-
if (typeof value === "number") {
|
|
17
|
-
const date = new Date();
|
|
18
|
-
date.setTime(value * 1000);
|
|
19
|
-
this.value = date.getUTCHours().toString().padStart(2, "0") +
|
|
20
|
-
date.getUTCMinutes().toString().padStart(2, "0") +
|
|
21
|
-
date.getUTCSeconds().toString().padStart(2, "0");
|
|
22
|
-
}
|
|
23
|
-
else if (typeof value === "string") {
|
|
24
|
-
this.value = value;
|
|
25
|
-
}
|
|
26
|
-
else if (value instanceof _1.Float) {
|
|
27
|
-
this.set(Math.round(value.getRaw()));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this.set(value.get());
|
|
31
|
-
}
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
clear() {
|
|
35
|
-
this.value = "000000";
|
|
36
|
-
}
|
|
37
|
-
get() {
|
|
38
|
-
return this.value;
|
|
39
|
-
}
|
|
40
|
-
getNumeric() {
|
|
41
|
-
const hours = parseInt(this.value.substr(0, 2), 10);
|
|
42
|
-
const minutes = parseInt(this.value.substr(2, 2), 10);
|
|
43
|
-
const seconds = parseInt(this.value.substr(4, 2), 10);
|
|
44
|
-
return hours * 3600 + minutes * 60 + seconds;
|
|
45
|
-
}
|
|
46
|
-
getOffset(input) {
|
|
47
|
-
if (input === null || input === void 0 ? void 0 : input.offset) {
|
|
48
|
-
input.offset = (0, _parse_1.parse)(input.offset);
|
|
49
|
-
}
|
|
50
|
-
if (input === null || input === void 0 ? void 0 : input.length) {
|
|
51
|
-
input.length = (0, _parse_1.parse)(input.length);
|
|
52
|
-
}
|
|
53
|
-
let ret = this.value;
|
|
54
|
-
if (input === null || input === void 0 ? void 0 : input.offset) {
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
ret = ret.substr(input.offset);
|
|
57
|
-
}
|
|
58
|
-
if ((input === null || input === void 0 ? void 0 : input.length) !== undefined) {
|
|
59
|
-
// @ts-ignore
|
|
60
|
-
ret = ret.substr(0, input.length);
|
|
61
|
-
}
|
|
62
|
-
const r = new string_1.String();
|
|
63
|
-
r.set(ret);
|
|
64
|
-
return r;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.Time = Time;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Time = void 0;
|
|
4
|
+
const string_1 = require("./string");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const _parse_1 = require("../operators/_parse");
|
|
7
|
+
class Time {
|
|
8
|
+
constructor(input) {
|
|
9
|
+
this.clear();
|
|
10
|
+
this.qualifiedName = input === null || input === void 0 ? void 0 : input.qualifiedName;
|
|
11
|
+
}
|
|
12
|
+
getQualifiedName() {
|
|
13
|
+
return this.qualifiedName;
|
|
14
|
+
}
|
|
15
|
+
set(value) {
|
|
16
|
+
if (typeof value === "number") {
|
|
17
|
+
const date = new Date();
|
|
18
|
+
date.setTime(value * 1000);
|
|
19
|
+
this.value = date.getUTCHours().toString().padStart(2, "0") +
|
|
20
|
+
date.getUTCMinutes().toString().padStart(2, "0") +
|
|
21
|
+
date.getUTCSeconds().toString().padStart(2, "0");
|
|
22
|
+
}
|
|
23
|
+
else if (typeof value === "string") {
|
|
24
|
+
this.value = value;
|
|
25
|
+
}
|
|
26
|
+
else if (value instanceof _1.Float) {
|
|
27
|
+
this.set(Math.round(value.getRaw()));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.set(value.get());
|
|
31
|
+
}
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
clear() {
|
|
35
|
+
this.value = "000000";
|
|
36
|
+
}
|
|
37
|
+
get() {
|
|
38
|
+
return this.value;
|
|
39
|
+
}
|
|
40
|
+
getNumeric() {
|
|
41
|
+
const hours = parseInt(this.value.substr(0, 2), 10);
|
|
42
|
+
const minutes = parseInt(this.value.substr(2, 2), 10);
|
|
43
|
+
const seconds = parseInt(this.value.substr(4, 2), 10);
|
|
44
|
+
return hours * 3600 + minutes * 60 + seconds;
|
|
45
|
+
}
|
|
46
|
+
getOffset(input) {
|
|
47
|
+
if (input === null || input === void 0 ? void 0 : input.offset) {
|
|
48
|
+
input.offset = (0, _parse_1.parse)(input.offset);
|
|
49
|
+
}
|
|
50
|
+
if (input === null || input === void 0 ? void 0 : input.length) {
|
|
51
|
+
input.length = (0, _parse_1.parse)(input.length);
|
|
52
|
+
}
|
|
53
|
+
let ret = this.value;
|
|
54
|
+
if (input === null || input === void 0 ? void 0 : input.offset) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
ret = ret.substr(input.offset);
|
|
57
|
+
}
|
|
58
|
+
if ((input === null || input === void 0 ? void 0 : input.length) !== undefined) {
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
ret = ret.substr(0, input.length);
|
|
61
|
+
}
|
|
62
|
+
const r = new string_1.String();
|
|
63
|
+
r.set(ret);
|
|
64
|
+
return r;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.Time = Time;
|
|
68
68
|
//# sourceMappingURL=time.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Hex } from "./hex";
|
|
2
|
-
import { ICharacter } from "./_character";
|
|
3
|
-
import { INumeric } from "./_numeric";
|
|
4
|
-
export declare class UTCLong implements ICharacter {
|
|
5
|
-
private value;
|
|
6
|
-
private readonly qualifiedName;
|
|
7
|
-
constructor(input?: {
|
|
8
|
-
qualifiedName?: string;
|
|
9
|
-
});
|
|
10
|
-
getQualifiedName(): string | undefined;
|
|
11
|
-
getOffset(_input: {
|
|
12
|
-
offset?: number | undefined;
|
|
13
|
-
length?: number | undefined;
|
|
14
|
-
}): ICharacter;
|
|
15
|
-
set(_value: INumeric | ICharacter | Hex | string | number): this;
|
|
16
|
-
clear(): void;
|
|
17
|
-
get(): string;
|
|
18
|
-
}
|
|
1
|
+
import { Hex } from "./hex";
|
|
2
|
+
import { ICharacter } from "./_character";
|
|
3
|
+
import { INumeric } from "./_numeric";
|
|
4
|
+
export declare class UTCLong implements ICharacter {
|
|
5
|
+
private value;
|
|
6
|
+
private readonly qualifiedName;
|
|
7
|
+
constructor(input?: {
|
|
8
|
+
qualifiedName?: string;
|
|
9
|
+
});
|
|
10
|
+
getQualifiedName(): string | undefined;
|
|
11
|
+
getOffset(_input: {
|
|
12
|
+
offset?: number | undefined;
|
|
13
|
+
length?: number | undefined;
|
|
14
|
+
}): ICharacter;
|
|
15
|
+
set(_value: INumeric | ICharacter | Hex | string | number): this;
|
|
16
|
+
clear(): void;
|
|
17
|
+
get(): string;
|
|
18
|
+
}
|