@abaplint/runtime 2.5.37 → 2.5.39
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,114 +1,114 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.insertInternal = void 0;
|
|
4
|
-
const clone_1 = require("../clone");
|
|
5
|
-
const compare_1 = require("../compare");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
const read_table_1 = require("./read_table");
|
|
8
|
-
const sort_1 = require("./sort");
|
|
9
|
-
function insertInternal(options) {
|
|
10
|
-
var _a, _b, _c, _d, _e;
|
|
11
|
-
if (options.table instanceof types_1.FieldSymbol) {
|
|
12
|
-
if (options.table.getPointer() === undefined) {
|
|
13
|
-
throw new Error("GETWA_NOT_ASSIGNED");
|
|
14
|
-
}
|
|
15
|
-
options.table = options.table.getPointer();
|
|
16
|
-
}
|
|
17
|
-
else if (options.data instanceof types_1.FieldSymbol) {
|
|
18
|
-
if (options.data.getPointer() === undefined) {
|
|
19
|
-
throw new Error("GETWA_NOT_ASSIGNED");
|
|
20
|
-
}
|
|
21
|
-
options.data = options.data.getPointer();
|
|
22
|
-
}
|
|
23
|
-
const tableOptions = options.table.getOptions();
|
|
24
|
-
const isSorted = ((_a = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _a === void 0 ? void 0 : _a.type) === types_1.TableAccessType.sorted || ((_b = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _b === void 0 ? void 0 : _b.type) === types_1.TableAccessType.hashed;
|
|
25
|
-
if (isSorted) {
|
|
26
|
-
const insert = options.data instanceof types_1.Structure ? options.data.get() : { table_line: options.data };
|
|
27
|
-
const compare = (row) => {
|
|
28
|
-
var _a;
|
|
29
|
-
for (const key of ((_a = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _a === void 0 ? void 0 : _a.keyFields) || []) {
|
|
30
|
-
if (key.includes("-")) {
|
|
31
|
-
const [first, second] = key.split("-");
|
|
32
|
-
if ((0, compare_1.ne)(row[first.toLowerCase()].get()[second.toLowerCase()], insert[first.toLowerCase()].get()[second.toLowerCase()])) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
if ((0, compare_1.ne)(row[key.toLowerCase()], insert[key.toLowerCase()])) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return true;
|
|
43
|
-
};
|
|
44
|
-
if (((_c = tableOptions.primaryKey) === null || _c === void 0 ? void 0 : _c.isUnique) === true) {
|
|
45
|
-
(0, read_table_1.readTable)(options.table, { withKey: compare });
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
if (abap.builtin.sy.get().subrc.get() === 0) {
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
abap.builtin.sy.get().subrc.set(4);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
let data = options.data;
|
|
55
|
-
if (typeof data === "string") {
|
|
56
|
-
const tmp = (0, clone_1.clone)(options.table.getRowType());
|
|
57
|
-
tmp.set(data);
|
|
58
|
-
data = tmp;
|
|
59
|
-
}
|
|
60
|
-
if (data && options.index) {
|
|
61
|
-
const index = options.index.get() - 1;
|
|
62
|
-
const val = options.table.insertIndex(data, index);
|
|
63
|
-
if (options.assigning) {
|
|
64
|
-
options.assigning.assign(val);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else if (options.lines && options.data instanceof types_1.Table) {
|
|
68
|
-
for (const i of options.data.array()) {
|
|
69
|
-
options.table.append(i);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
else if (options.initial === true) {
|
|
73
|
-
let index = options.table.array().length;
|
|
74
|
-
if (options.index) {
|
|
75
|
-
index = options.index.get() - 1;
|
|
76
|
-
}
|
|
77
|
-
const val = options.table.insertIndex(options.table.getRowType(), index);
|
|
78
|
-
if (options.assigning) {
|
|
79
|
-
options.assigning.assign(val);
|
|
80
|
-
}
|
|
81
|
-
if (options.referenceInto) {
|
|
82
|
-
options.referenceInto.assign(val);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
else if (data) {
|
|
86
|
-
// todo, for now it just appends, this is not correct, but currently the table type is not known
|
|
87
|
-
const val = options.table.insertIndex(data, options.table.array().length);
|
|
88
|
-
if (options.assigning) {
|
|
89
|
-
options.assigning.assign(val);
|
|
90
|
-
}
|
|
91
|
-
if (options.referenceInto) {
|
|
92
|
-
options.referenceInto.assign(val);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// @ts-ignore
|
|
96
|
-
abap.builtin.sy.get().subrc.set(0);
|
|
97
|
-
if (isSorted) {
|
|
98
|
-
// slow, but works for now
|
|
99
|
-
let by = (_e = (_d = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _d === void 0 ? void 0 : _d.keyFields) === null || _e === void 0 ? void 0 : _e.map(f => {
|
|
100
|
-
return { component: f.toLowerCase() };
|
|
101
|
-
});
|
|
102
|
-
if ((by === null || by === void 0 ? void 0 : by.length) === 1 && by[0].component === "table_line") {
|
|
103
|
-
by = [];
|
|
104
|
-
}
|
|
105
|
-
if (by && by.length > 0) {
|
|
106
|
-
(0, sort_1.sort)(options.table, { by: by });
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
(0, sort_1.sort)(options.table);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.insertInternal = insertInternal;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insertInternal = void 0;
|
|
4
|
+
const clone_1 = require("../clone");
|
|
5
|
+
const compare_1 = require("../compare");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
const read_table_1 = require("./read_table");
|
|
8
|
+
const sort_1 = require("./sort");
|
|
9
|
+
function insertInternal(options) {
|
|
10
|
+
var _a, _b, _c, _d, _e;
|
|
11
|
+
if (options.table instanceof types_1.FieldSymbol) {
|
|
12
|
+
if (options.table.getPointer() === undefined) {
|
|
13
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
14
|
+
}
|
|
15
|
+
options.table = options.table.getPointer();
|
|
16
|
+
}
|
|
17
|
+
else if (options.data instanceof types_1.FieldSymbol) {
|
|
18
|
+
if (options.data.getPointer() === undefined) {
|
|
19
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
20
|
+
}
|
|
21
|
+
options.data = options.data.getPointer();
|
|
22
|
+
}
|
|
23
|
+
const tableOptions = options.table.getOptions();
|
|
24
|
+
const isSorted = ((_a = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _a === void 0 ? void 0 : _a.type) === types_1.TableAccessType.sorted || ((_b = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _b === void 0 ? void 0 : _b.type) === types_1.TableAccessType.hashed;
|
|
25
|
+
if (isSorted) {
|
|
26
|
+
const insert = options.data instanceof types_1.Structure ? options.data.get() : { table_line: options.data };
|
|
27
|
+
const compare = (row) => {
|
|
28
|
+
var _a;
|
|
29
|
+
for (const key of ((_a = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _a === void 0 ? void 0 : _a.keyFields) || []) {
|
|
30
|
+
if (key.includes("-")) {
|
|
31
|
+
const [first, second] = key.split("-");
|
|
32
|
+
if ((0, compare_1.ne)(row[first.toLowerCase()].get()[second.toLowerCase()], insert[first.toLowerCase()].get()[second.toLowerCase()])) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
if ((0, compare_1.ne)(row[key.toLowerCase()], insert[key.toLowerCase()])) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
if (((_c = tableOptions.primaryKey) === null || _c === void 0 ? void 0 : _c.isUnique) === true) {
|
|
45
|
+
(0, read_table_1.readTable)(options.table, { withKey: compare });
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
if (abap.builtin.sy.get().subrc.get() === 0) {
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let data = options.data;
|
|
55
|
+
if (typeof data === "string") {
|
|
56
|
+
const tmp = (0, clone_1.clone)(options.table.getRowType());
|
|
57
|
+
tmp.set(data);
|
|
58
|
+
data = tmp;
|
|
59
|
+
}
|
|
60
|
+
if (data && options.index) {
|
|
61
|
+
const index = options.index.get() - 1;
|
|
62
|
+
const val = options.table.insertIndex(data, index);
|
|
63
|
+
if (options.assigning) {
|
|
64
|
+
options.assigning.assign(val);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else if (options.lines && options.data instanceof types_1.Table) {
|
|
68
|
+
for (const i of options.data.array()) {
|
|
69
|
+
options.table.append(i);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else if (options.initial === true) {
|
|
73
|
+
let index = options.table.array().length;
|
|
74
|
+
if (options.index) {
|
|
75
|
+
index = options.index.get() - 1;
|
|
76
|
+
}
|
|
77
|
+
const val = options.table.insertIndex(options.table.getRowType(), index);
|
|
78
|
+
if (options.assigning) {
|
|
79
|
+
options.assigning.assign(val);
|
|
80
|
+
}
|
|
81
|
+
if (options.referenceInto) {
|
|
82
|
+
options.referenceInto.assign(val);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if (data) {
|
|
86
|
+
// todo, for now it just appends, this is not correct, but currently the table type is not known
|
|
87
|
+
const val = options.table.insertIndex(data, options.table.array().length);
|
|
88
|
+
if (options.assigning) {
|
|
89
|
+
options.assigning.assign(val);
|
|
90
|
+
}
|
|
91
|
+
if (options.referenceInto) {
|
|
92
|
+
options.referenceInto.assign(val);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
97
|
+
if (isSorted) {
|
|
98
|
+
// slow, but works for now
|
|
99
|
+
let by = (_e = (_d = tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.primaryKey) === null || _d === void 0 ? void 0 : _d.keyFields) === null || _e === void 0 ? void 0 : _e.map(f => {
|
|
100
|
+
return { component: f.toLowerCase() };
|
|
101
|
+
});
|
|
102
|
+
if ((by === null || by === void 0 ? void 0 : by.length) === 1 && by[0].component === "table_line") {
|
|
103
|
+
by = [];
|
|
104
|
+
}
|
|
105
|
+
if (by && by.length > 0) {
|
|
106
|
+
(0, sort_1.sort)(options.table, { by: by });
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
(0, sort_1.sort)(options.table);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.insertInternal = insertInternal;
|
|
114
114
|
//# sourceMappingURL=insert_internal.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { FieldSymbol, Integer, Table } from "../types";
|
|
2
|
-
import { ICharacter } from "../types/_character";
|
|
3
|
-
import { INumeric } from "../types/_numeric";
|
|
4
|
-
|
|
5
|
-
[name: string]: INumeric | ICharacter;
|
|
6
|
-
};
|
|
7
|
-
export interface ILoopOptions {
|
|
8
|
-
where?: (i: any) => Promise<boolean>;
|
|
9
|
-
usingKey?: string;
|
|
10
|
-
from?: Integer;
|
|
11
|
-
to?: Integer;
|
|
12
|
-
topEquals?: topType;
|
|
13
|
-
}
|
|
14
|
-
export declare function loop(table: Table | FieldSymbol | undefined, options?: ILoopOptions): AsyncGenerator<any, void, unknown>;
|
|
15
|
-
export {};
|
|
1
|
+
import { FieldSymbol, Integer, Table } from "../types";
|
|
2
|
+
import { ICharacter } from "../types/_character";
|
|
3
|
+
import { INumeric } from "../types/_numeric";
|
|
4
|
+
type topType = {
|
|
5
|
+
[name: string]: INumeric | ICharacter;
|
|
6
|
+
};
|
|
7
|
+
export interface ILoopOptions {
|
|
8
|
+
where?: (i: any) => Promise<boolean>;
|
|
9
|
+
usingKey?: string;
|
|
10
|
+
from?: Integer;
|
|
11
|
+
to?: Integer;
|
|
12
|
+
topEquals?: topType;
|
|
13
|
+
}
|
|
14
|
+
export declare function loop(table: Table | FieldSymbol | undefined, options?: ILoopOptions): AsyncGenerator<any, void, unknown>;
|
|
15
|
+
export {};
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
3
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
4
|
-
var m = o[Symbol.asyncIterator], i;
|
|
5
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
6
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
7
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
8
|
-
};
|
|
9
|
-
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
10
|
-
var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
|
|
11
|
-
var i, p;
|
|
12
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
13
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done:
|
|
14
|
-
};
|
|
15
|
-
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
16
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
17
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
18
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
19
|
-
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
20
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
21
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
22
|
-
function fulfill(value) { resume("next", value); }
|
|
23
|
-
function reject(value) { resume("throw", value); }
|
|
24
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.loop = void 0;
|
|
28
|
-
const binary_search_1 = require("../binary_search");
|
|
29
|
-
const types_1 = require("../types");
|
|
30
|
-
function determineFromTo(array, topEquals, key) {
|
|
31
|
-
if (topEquals === undefined) {
|
|
32
|
-
// if there is no WHERE supplied, its using the sorting of the secondary key
|
|
33
|
-
return { from: 1, to: array.length };
|
|
34
|
-
}
|
|
35
|
-
let from = 0;
|
|
36
|
-
let to = array.length;
|
|
37
|
-
// todo: multi field
|
|
38
|
-
const keyField = key.keyFields[0].toLowerCase();
|
|
39
|
-
const keyValue = topEquals[keyField];
|
|
40
|
-
if (keyField && keyValue) {
|
|
41
|
-
from = (0, binary_search_1.binarySearchFrom)(array, from, to, keyField, keyValue);
|
|
42
|
-
to = (0, binary_search_1.binarySearchTo)(array, from, to, keyField, keyValue);
|
|
43
|
-
// console.dir("from: " + from + ", to: " + to);
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
from: from,
|
|
47
|
-
to: to,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function loop(table, options) {
|
|
51
|
-
return __asyncGenerator(this, arguments, function* loop_1() {
|
|
52
|
-
if (table === undefined) {
|
|
53
|
-
throw new Error("LOOP at undefined");
|
|
54
|
-
}
|
|
55
|
-
else if (table instanceof types_1.FieldSymbol) {
|
|
56
|
-
const pnt = table.getPointer();
|
|
57
|
-
if (pnt === undefined) {
|
|
58
|
-
throw new Error("GETWA_NOT_ASSIGNED");
|
|
59
|
-
}
|
|
60
|
-
yield __await(yield* __asyncDelegator(__asyncValues(loop(pnt, options))));
|
|
61
|
-
return yield __await(void 0);
|
|
62
|
-
}
|
|
63
|
-
const length = table.array().length;
|
|
64
|
-
if (length === 0) {
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
abap.builtin.sy.get().subrc.set(4);
|
|
67
|
-
return yield __await(void 0);
|
|
68
|
-
}
|
|
69
|
-
let loopFrom = (options === null || options === void 0 ? void 0 : options.from) && (options === null || options === void 0 ? void 0 : options.from.get()) > 0 ? options.from.get() - 1 : 0;
|
|
70
|
-
let loopTo = (options === null || options === void 0 ? void 0 : options.to) && options.to.get() < length ? options.to.get() : length;
|
|
71
|
-
let array = [];
|
|
72
|
-
if ((options === null || options === void 0 ? void 0 : options.usingKey) && options.usingKey !== undefined && options.usingKey !== "primary_key") {
|
|
73
|
-
array = table.getSecondaryIndex(options.usingKey);
|
|
74
|
-
const { from, to } = determineFromTo(array, options.topEquals, table.getKeyByName(options.usingKey));
|
|
75
|
-
loopFrom = Math.max(loopFrom, from) - 1;
|
|
76
|
-
loopTo = Math.min(loopTo, to);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
array = table.array();
|
|
80
|
-
}
|
|
81
|
-
const loopIndex = table.startLoop(loopFrom);
|
|
82
|
-
let entered = false;
|
|
83
|
-
try {
|
|
84
|
-
const isStructured = array[0] instanceof types_1.Structure;
|
|
85
|
-
while (loopIndex.index < loopTo) {
|
|
86
|
-
if (loopIndex.index > array.length) {
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
const current = array[loopIndex.index];
|
|
90
|
-
if (options === null || options === void 0 ? void 0 : options.where) {
|
|
91
|
-
const row = isStructured ? current.get() : { table_line: current };
|
|
92
|
-
if ((yield __await(options.where(row))) === false) {
|
|
93
|
-
loopIndex.index++;
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
abap.builtin.sy.get().tabix.set(loopIndex.index + 1);
|
|
99
|
-
entered = true;
|
|
100
|
-
yield yield __await(current);
|
|
101
|
-
loopIndex.index++;
|
|
102
|
-
if ((options === null || options === void 0 ? void 0 : options.to) === undefined && (options === null || options === void 0 ? void 0 : options.usingKey) === undefined) {
|
|
103
|
-
// extra rows might have been inserted inside the loop
|
|
104
|
-
loopTo = array.length;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
finally {
|
|
109
|
-
table.unregisterLoop(loopIndex);
|
|
110
|
-
// @ts-ignore
|
|
111
|
-
abap.builtin.sy.get().subrc.set(entered ? 0 : 4);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
exports.loop = loop;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
3
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
4
|
+
var m = o[Symbol.asyncIterator], i;
|
|
5
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
6
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
7
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
8
|
+
};
|
|
9
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
10
|
+
var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
|
|
11
|
+
var i, p;
|
|
12
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
13
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
14
|
+
};
|
|
15
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
16
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
17
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
18
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
19
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
20
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
21
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
22
|
+
function fulfill(value) { resume("next", value); }
|
|
23
|
+
function reject(value) { resume("throw", value); }
|
|
24
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.loop = void 0;
|
|
28
|
+
const binary_search_1 = require("../binary_search");
|
|
29
|
+
const types_1 = require("../types");
|
|
30
|
+
function determineFromTo(array, topEquals, key) {
|
|
31
|
+
if (topEquals === undefined) {
|
|
32
|
+
// if there is no WHERE supplied, its using the sorting of the secondary key
|
|
33
|
+
return { from: 1, to: array.length };
|
|
34
|
+
}
|
|
35
|
+
let from = 0;
|
|
36
|
+
let to = array.length;
|
|
37
|
+
// todo: multi field
|
|
38
|
+
const keyField = key.keyFields[0].toLowerCase();
|
|
39
|
+
const keyValue = topEquals[keyField];
|
|
40
|
+
if (keyField && keyValue) {
|
|
41
|
+
from = (0, binary_search_1.binarySearchFrom)(array, from, to, keyField, keyValue);
|
|
42
|
+
to = (0, binary_search_1.binarySearchTo)(array, from, to, keyField, keyValue);
|
|
43
|
+
// console.dir("from: " + from + ", to: " + to);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
from: from,
|
|
47
|
+
to: to,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function loop(table, options) {
|
|
51
|
+
return __asyncGenerator(this, arguments, function* loop_1() {
|
|
52
|
+
if (table === undefined) {
|
|
53
|
+
throw new Error("LOOP at undefined");
|
|
54
|
+
}
|
|
55
|
+
else if (table instanceof types_1.FieldSymbol) {
|
|
56
|
+
const pnt = table.getPointer();
|
|
57
|
+
if (pnt === undefined) {
|
|
58
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
59
|
+
}
|
|
60
|
+
yield __await(yield* __asyncDelegator(__asyncValues(loop(pnt, options))));
|
|
61
|
+
return yield __await(void 0);
|
|
62
|
+
}
|
|
63
|
+
const length = table.array().length;
|
|
64
|
+
if (length === 0) {
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
67
|
+
return yield __await(void 0);
|
|
68
|
+
}
|
|
69
|
+
let loopFrom = (options === null || options === void 0 ? void 0 : options.from) && (options === null || options === void 0 ? void 0 : options.from.get()) > 0 ? options.from.get() - 1 : 0;
|
|
70
|
+
let loopTo = (options === null || options === void 0 ? void 0 : options.to) && options.to.get() < length ? options.to.get() : length;
|
|
71
|
+
let array = [];
|
|
72
|
+
if ((options === null || options === void 0 ? void 0 : options.usingKey) && options.usingKey !== undefined && options.usingKey !== "primary_key") {
|
|
73
|
+
array = table.getSecondaryIndex(options.usingKey);
|
|
74
|
+
const { from, to } = determineFromTo(array, options.topEquals, table.getKeyByName(options.usingKey));
|
|
75
|
+
loopFrom = Math.max(loopFrom, from) - 1;
|
|
76
|
+
loopTo = Math.min(loopTo, to);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
array = table.array();
|
|
80
|
+
}
|
|
81
|
+
const loopIndex = table.startLoop(loopFrom);
|
|
82
|
+
let entered = false;
|
|
83
|
+
try {
|
|
84
|
+
const isStructured = array[0] instanceof types_1.Structure;
|
|
85
|
+
while (loopIndex.index < loopTo) {
|
|
86
|
+
if (loopIndex.index > array.length) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
const current = array[loopIndex.index];
|
|
90
|
+
if (options === null || options === void 0 ? void 0 : options.where) {
|
|
91
|
+
const row = isStructured ? current.get() : { table_line: current };
|
|
92
|
+
if ((yield __await(options.where(row))) === false) {
|
|
93
|
+
loopIndex.index++;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
abap.builtin.sy.get().tabix.set(loopIndex.index + 1);
|
|
99
|
+
entered = true;
|
|
100
|
+
yield yield __await(current);
|
|
101
|
+
loopIndex.index++;
|
|
102
|
+
if ((options === null || options === void 0 ? void 0 : options.to) === undefined && (options === null || options === void 0 ? void 0 : options.usingKey) === undefined) {
|
|
103
|
+
// extra rows might have been inserted inside the loop
|
|
104
|
+
loopTo = array.length;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
finally {
|
|
109
|
+
table.unregisterLoop(loopIndex);
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
abap.builtin.sy.get().subrc.set(entered ? 0 : 4);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
exports.loop = loop;
|
|
116
116
|
//# sourceMappingURL=loop.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Context } from "../context";
|
|
2
|
-
import { ABAPObject } from "../types";
|
|
3
|
-
import { ICharacter } from "../types/_character";
|
|
4
|
-
export interface IMessageOptions {
|
|
5
|
-
id?: ICharacter | string;
|
|
6
|
-
number?: ICharacter | string;
|
|
7
|
-
type?: ICharacter | string;
|
|
8
|
-
displayLike?: ICharacter | string;
|
|
9
|
-
exception?: ABAPObject;
|
|
10
|
-
with?: (ICharacter | string)[];
|
|
11
|
-
into?: ICharacter;
|
|
12
|
-
}
|
|
13
|
-
export declare class MessageStatement {
|
|
14
|
-
private readonly context;
|
|
15
|
-
constructor(context: Context);
|
|
16
|
-
message(options: IMessageOptions): Promise<void>;
|
|
17
|
-
}
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
import { ABAPObject } from "../types";
|
|
3
|
+
import { ICharacter } from "../types/_character";
|
|
4
|
+
export interface IMessageOptions {
|
|
5
|
+
id?: ICharacter | string;
|
|
6
|
+
number?: ICharacter | string;
|
|
7
|
+
type?: ICharacter | string;
|
|
8
|
+
displayLike?: ICharacter | string;
|
|
9
|
+
exception?: ABAPObject;
|
|
10
|
+
with?: (ICharacter | string)[];
|
|
11
|
+
into?: ICharacter;
|
|
12
|
+
}
|
|
13
|
+
export declare class MessageStatement {
|
|
14
|
+
private readonly context;
|
|
15
|
+
constructor(context: Context);
|
|
16
|
+
message(options: IMessageOptions): Promise<void>;
|
|
17
|
+
}
|