@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,96 +1,96 @@
|
|
|
1
|
-
import { append } from "./append";
|
|
2
|
-
import { assert } from "./assert";
|
|
3
|
-
import { assign } from "./assign";
|
|
4
|
-
import { clear } from "./clear";
|
|
5
|
-
import { commit } from "./commit";
|
|
6
|
-
import { concatenate } from "./concatenate";
|
|
7
|
-
import { condense } from "./condense";
|
|
8
|
-
import { convert } from "./convert";
|
|
9
|
-
import { createData } from "./create_data";
|
|
10
|
-
import { deleteInternal } from "./delete_internal";
|
|
11
|
-
import { describe } from "./describe";
|
|
12
|
-
import { find } from "./find";
|
|
13
|
-
import { collect } from "./collect";
|
|
14
|
-
import { overlay } from "./overlay";
|
|
15
|
-
import { cast } from "./cast";
|
|
16
|
-
import { getBit } from "./get_bit";
|
|
17
|
-
import { readReport } from "./read_report";
|
|
18
|
-
import { raiseEvent } from "./raise_event";
|
|
19
|
-
import { getLocale } from "./get_locale";
|
|
20
|
-
import { getParameter } from "./get_parameter";
|
|
21
|
-
import { setLocale } from "./set_locale";
|
|
22
|
-
import { getRunTime } from "./get_run_time";
|
|
23
|
-
import { getTime } from "./get_time";
|
|
24
|
-
import { IInsertDatabaseOptions } from "./insert_database";
|
|
25
|
-
import { insertInternal } from "./insert_internal";
|
|
26
|
-
import { IDeleteDatabaseOptions } from "./delete_database";
|
|
27
|
-
import { loop } from "./loop";
|
|
28
|
-
import { IMessageOptions } from "./message";
|
|
29
|
-
import { IModifyDatabaseOptions } from "./modify_database";
|
|
30
|
-
import { modifyInternal } from "./modify_internal";
|
|
31
|
-
import { moveCorresponding } from "./move_corresponding";
|
|
32
|
-
import { readTable } from "./read_table";
|
|
33
|
-
import { replace } from "./replace";
|
|
34
|
-
import { rollback } from "./rollback";
|
|
35
|
-
import { setBit } from "./set_bit";
|
|
36
|
-
import { shift } from "./shift";
|
|
37
|
-
import { sort } from "./sort";
|
|
38
|
-
import { setHandler } from "./set_handler";
|
|
39
|
-
import { split } from "./split";
|
|
40
|
-
import { translate } from "./translate";
|
|
41
|
-
import { IUpdateDatabaseOptions } from "./update_database";
|
|
42
|
-
import { IWriteOptions } from "./write";
|
|
43
|
-
import { Context } from "../context";
|
|
44
|
-
import { ICharacter } from "../types/_character";
|
|
45
|
-
import { FieldSymbol, Structure, Table } from "../types";
|
|
46
|
-
import { INumeric } from "../types/_numeric";
|
|
47
|
-
import { ICallFunctionOptions } from "./call_function";
|
|
48
|
-
import { SelectDatabaseOptions, SelectRuntimeOptions } from "../db/db";
|
|
49
|
-
export declare class Statements {
|
|
50
|
-
append: typeof append;
|
|
51
|
-
assert: typeof assert;
|
|
52
|
-
assign: typeof assign;
|
|
53
|
-
cast: typeof cast;
|
|
54
|
-
clear: typeof clear;
|
|
55
|
-
collect: typeof collect;
|
|
56
|
-
commit: typeof commit;
|
|
57
|
-
concatenate: typeof concatenate;
|
|
58
|
-
condense: typeof condense;
|
|
59
|
-
convert: typeof convert;
|
|
60
|
-
createData: typeof createData;
|
|
61
|
-
deleteInternal: typeof deleteInternal;
|
|
62
|
-
describe: typeof describe;
|
|
63
|
-
find: typeof find;
|
|
64
|
-
getBit: typeof getBit;
|
|
65
|
-
readReport: typeof readReport;
|
|
66
|
-
getLocale: typeof getLocale;
|
|
67
|
-
getParameter: typeof getParameter;
|
|
68
|
-
getRunTime: typeof getRunTime;
|
|
69
|
-
getTime: typeof getTime;
|
|
70
|
-
insertInternal: typeof insertInternal;
|
|
71
|
-
loop: typeof loop;
|
|
72
|
-
modifyInternal: typeof modifyInternal;
|
|
73
|
-
moveCorresponding: typeof moveCorresponding;
|
|
74
|
-
overlay: typeof overlay;
|
|
75
|
-
raiseEvent: typeof raiseEvent;
|
|
76
|
-
readTable: typeof readTable;
|
|
77
|
-
replace: typeof replace;
|
|
78
|
-
rollback: typeof rollback;
|
|
79
|
-
setBit: typeof setBit;
|
|
80
|
-
setHandler: typeof setHandler;
|
|
81
|
-
setLocale: typeof setLocale;
|
|
82
|
-
shift: typeof shift;
|
|
83
|
-
sort: typeof sort;
|
|
84
|
-
split: typeof split;
|
|
85
|
-
translate: typeof translate;
|
|
86
|
-
private readonly context;
|
|
87
|
-
constructor(context: Context);
|
|
88
|
-
deleteDatabase(table: string | ICharacter, options: IDeleteDatabaseOptions): Promise<void>;
|
|
89
|
-
insertDatabase(table: string | ICharacter, options: IInsertDatabaseOptions): Promise<number | undefined>;
|
|
90
|
-
message(options: IMessageOptions): Promise<void>;
|
|
91
|
-
modifyDatabase(table: string | ICharacter, options: IModifyDatabaseOptions): Promise<void>;
|
|
92
|
-
select(target: Structure | Table | FieldSymbol, select: SelectDatabaseOptions, runtimeOptions?: SelectRuntimeOptions): Promise<void>;
|
|
93
|
-
updateDatabase(table: string | ICharacter, options: IUpdateDatabaseOptions): Promise<number>;
|
|
94
|
-
callFunction(options: ICallFunctionOptions): Promise<void>;
|
|
95
|
-
write(source: INumeric | ICharacter | FieldSymbol | string | number, options?: IWriteOptions): void;
|
|
96
|
-
}
|
|
1
|
+
import { append } from "./append";
|
|
2
|
+
import { assert } from "./assert";
|
|
3
|
+
import { assign } from "./assign";
|
|
4
|
+
import { clear } from "./clear";
|
|
5
|
+
import { commit } from "./commit";
|
|
6
|
+
import { concatenate } from "./concatenate";
|
|
7
|
+
import { condense } from "./condense";
|
|
8
|
+
import { convert } from "./convert";
|
|
9
|
+
import { createData } from "./create_data";
|
|
10
|
+
import { deleteInternal } from "./delete_internal";
|
|
11
|
+
import { describe } from "./describe";
|
|
12
|
+
import { find } from "./find";
|
|
13
|
+
import { collect } from "./collect";
|
|
14
|
+
import { overlay } from "./overlay";
|
|
15
|
+
import { cast } from "./cast";
|
|
16
|
+
import { getBit } from "./get_bit";
|
|
17
|
+
import { readReport } from "./read_report";
|
|
18
|
+
import { raiseEvent } from "./raise_event";
|
|
19
|
+
import { getLocale } from "./get_locale";
|
|
20
|
+
import { getParameter } from "./get_parameter";
|
|
21
|
+
import { setLocale } from "./set_locale";
|
|
22
|
+
import { getRunTime } from "./get_run_time";
|
|
23
|
+
import { getTime } from "./get_time";
|
|
24
|
+
import { IInsertDatabaseOptions } from "./insert_database";
|
|
25
|
+
import { insertInternal } from "./insert_internal";
|
|
26
|
+
import { IDeleteDatabaseOptions } from "./delete_database";
|
|
27
|
+
import { loop } from "./loop";
|
|
28
|
+
import { IMessageOptions } from "./message";
|
|
29
|
+
import { IModifyDatabaseOptions } from "./modify_database";
|
|
30
|
+
import { modifyInternal } from "./modify_internal";
|
|
31
|
+
import { moveCorresponding } from "./move_corresponding";
|
|
32
|
+
import { readTable } from "./read_table";
|
|
33
|
+
import { replace } from "./replace";
|
|
34
|
+
import { rollback } from "./rollback";
|
|
35
|
+
import { setBit } from "./set_bit";
|
|
36
|
+
import { shift } from "./shift";
|
|
37
|
+
import { sort } from "./sort";
|
|
38
|
+
import { setHandler } from "./set_handler";
|
|
39
|
+
import { split } from "./split";
|
|
40
|
+
import { translate } from "./translate";
|
|
41
|
+
import { IUpdateDatabaseOptions } from "./update_database";
|
|
42
|
+
import { IWriteOptions } from "./write";
|
|
43
|
+
import { Context } from "../context";
|
|
44
|
+
import { ICharacter } from "../types/_character";
|
|
45
|
+
import { FieldSymbol, Structure, Table } from "../types";
|
|
46
|
+
import { INumeric } from "../types/_numeric";
|
|
47
|
+
import { ICallFunctionOptions } from "./call_function";
|
|
48
|
+
import { SelectDatabaseOptions, SelectRuntimeOptions } from "../db/db";
|
|
49
|
+
export declare class Statements {
|
|
50
|
+
append: typeof append;
|
|
51
|
+
assert: typeof assert;
|
|
52
|
+
assign: typeof assign;
|
|
53
|
+
cast: typeof cast;
|
|
54
|
+
clear: typeof clear;
|
|
55
|
+
collect: typeof collect;
|
|
56
|
+
commit: typeof commit;
|
|
57
|
+
concatenate: typeof concatenate;
|
|
58
|
+
condense: typeof condense;
|
|
59
|
+
convert: typeof convert;
|
|
60
|
+
createData: typeof createData;
|
|
61
|
+
deleteInternal: typeof deleteInternal;
|
|
62
|
+
describe: typeof describe;
|
|
63
|
+
find: typeof find;
|
|
64
|
+
getBit: typeof getBit;
|
|
65
|
+
readReport: typeof readReport;
|
|
66
|
+
getLocale: typeof getLocale;
|
|
67
|
+
getParameter: typeof getParameter;
|
|
68
|
+
getRunTime: typeof getRunTime;
|
|
69
|
+
getTime: typeof getTime;
|
|
70
|
+
insertInternal: typeof insertInternal;
|
|
71
|
+
loop: typeof loop;
|
|
72
|
+
modifyInternal: typeof modifyInternal;
|
|
73
|
+
moveCorresponding: typeof moveCorresponding;
|
|
74
|
+
overlay: typeof overlay;
|
|
75
|
+
raiseEvent: typeof raiseEvent;
|
|
76
|
+
readTable: typeof readTable;
|
|
77
|
+
replace: typeof replace;
|
|
78
|
+
rollback: typeof rollback;
|
|
79
|
+
setBit: typeof setBit;
|
|
80
|
+
setHandler: typeof setHandler;
|
|
81
|
+
setLocale: typeof setLocale;
|
|
82
|
+
shift: typeof shift;
|
|
83
|
+
sort: typeof sort;
|
|
84
|
+
split: typeof split;
|
|
85
|
+
translate: typeof translate;
|
|
86
|
+
private readonly context;
|
|
87
|
+
constructor(context: Context);
|
|
88
|
+
deleteDatabase(table: string | ICharacter, options: IDeleteDatabaseOptions): Promise<void>;
|
|
89
|
+
insertDatabase(table: string | ICharacter, options: IInsertDatabaseOptions): Promise<number | undefined>;
|
|
90
|
+
message(options: IMessageOptions): Promise<void>;
|
|
91
|
+
modifyDatabase(table: string | ICharacter, options: IModifyDatabaseOptions): Promise<void>;
|
|
92
|
+
select(target: Structure | Table | FieldSymbol, select: SelectDatabaseOptions, runtimeOptions?: SelectRuntimeOptions): Promise<void>;
|
|
93
|
+
updateDatabase(table: string | ICharacter, options: IUpdateDatabaseOptions): Promise<number>;
|
|
94
|
+
callFunction(options: ICallFunctionOptions): Promise<void>;
|
|
95
|
+
write(source: INumeric | ICharacter | FieldSymbol | string | number, options?: IWriteOptions): void;
|
|
96
|
+
}
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Statements = void 0;
|
|
4
|
-
const append_1 = require("./append");
|
|
5
|
-
const assert_1 = require("./assert");
|
|
6
|
-
const assign_1 = require("./assign");
|
|
7
|
-
const clear_1 = require("./clear");
|
|
8
|
-
const commit_1 = require("./commit");
|
|
9
|
-
const concatenate_1 = require("./concatenate");
|
|
10
|
-
const condense_1 = require("./condense");
|
|
11
|
-
const convert_1 = require("./convert");
|
|
12
|
-
const create_data_1 = require("./create_data");
|
|
13
|
-
const delete_internal_1 = require("./delete_internal");
|
|
14
|
-
const describe_1 = require("./describe");
|
|
15
|
-
const find_1 = require("./find");
|
|
16
|
-
const collect_1 = require("./collect");
|
|
17
|
-
const overlay_1 = require("./overlay");
|
|
18
|
-
const cast_1 = require("./cast");
|
|
19
|
-
const get_bit_1 = require("./get_bit");
|
|
20
|
-
const read_report_1 = require("./read_report");
|
|
21
|
-
const raise_event_1 = require("./raise_event");
|
|
22
|
-
const get_locale_1 = require("./get_locale");
|
|
23
|
-
const get_parameter_1 = require("./get_parameter");
|
|
24
|
-
const set_locale_1 = require("./set_locale");
|
|
25
|
-
const get_run_time_1 = require("./get_run_time");
|
|
26
|
-
const get_time_1 = require("./get_time");
|
|
27
|
-
const insert_database_1 = require("./insert_database");
|
|
28
|
-
const insert_internal_1 = require("./insert_internal");
|
|
29
|
-
const delete_database_1 = require("./delete_database");
|
|
30
|
-
const loop_1 = require("./loop");
|
|
31
|
-
const message_1 = require("./message");
|
|
32
|
-
const modify_database_1 = require("./modify_database");
|
|
33
|
-
const modify_internal_1 = require("./modify_internal");
|
|
34
|
-
const move_corresponding_1 = require("./move_corresponding");
|
|
35
|
-
const read_table_1 = require("./read_table");
|
|
36
|
-
const replace_1 = require("./replace");
|
|
37
|
-
const rollback_1 = require("./rollback");
|
|
38
|
-
const select_1 = require("./select");
|
|
39
|
-
const set_bit_1 = require("./set_bit");
|
|
40
|
-
const shift_1 = require("./shift");
|
|
41
|
-
const sort_1 = require("./sort");
|
|
42
|
-
const set_handler_1 = require("./set_handler");
|
|
43
|
-
const split_1 = require("./split");
|
|
44
|
-
const translate_1 = require("./translate");
|
|
45
|
-
const update_database_1 = require("./update_database");
|
|
46
|
-
const write_1 = require("./write");
|
|
47
|
-
const call_function_1 = require("./call_function");
|
|
48
|
-
// this is a class, as statements like SELECT needs access to the database object instance
|
|
49
|
-
// and WRITE will access the Console
|
|
50
|
-
class Statements {
|
|
51
|
-
constructor(context) {
|
|
52
|
-
this.append = append_1.append;
|
|
53
|
-
this.assert = assert_1.assert;
|
|
54
|
-
this.assign = assign_1.assign;
|
|
55
|
-
this.cast = cast_1.cast;
|
|
56
|
-
this.clear = clear_1.clear;
|
|
57
|
-
this.collect = collect_1.collect;
|
|
58
|
-
this.commit = commit_1.commit;
|
|
59
|
-
this.concatenate = concatenate_1.concatenate;
|
|
60
|
-
this.condense = condense_1.condense;
|
|
61
|
-
this.convert = convert_1.convert;
|
|
62
|
-
this.createData = create_data_1.createData;
|
|
63
|
-
this.deleteInternal = delete_internal_1.deleteInternal;
|
|
64
|
-
this.describe = describe_1.describe;
|
|
65
|
-
this.find = find_1.find;
|
|
66
|
-
this.getBit = get_bit_1.getBit;
|
|
67
|
-
this.readReport = read_report_1.readReport;
|
|
68
|
-
this.getLocale = get_locale_1.getLocale;
|
|
69
|
-
this.getParameter = get_parameter_1.getParameter;
|
|
70
|
-
this.getRunTime = get_run_time_1.getRunTime;
|
|
71
|
-
this.getTime = get_time_1.getTime;
|
|
72
|
-
this.insertInternal = insert_internal_1.insertInternal;
|
|
73
|
-
this.loop = loop_1.loop;
|
|
74
|
-
this.modifyInternal = modify_internal_1.modifyInternal;
|
|
75
|
-
this.moveCorresponding = move_corresponding_1.moveCorresponding;
|
|
76
|
-
this.overlay = overlay_1.overlay;
|
|
77
|
-
this.raiseEvent = raise_event_1.raiseEvent;
|
|
78
|
-
this.readTable = read_table_1.readTable;
|
|
79
|
-
this.replace = replace_1.replace;
|
|
80
|
-
this.rollback = rollback_1.rollback;
|
|
81
|
-
this.setBit = set_bit_1.setBit;
|
|
82
|
-
this.setHandler = set_handler_1.setHandler;
|
|
83
|
-
this.setLocale = set_locale_1.setLocale;
|
|
84
|
-
this.shift = shift_1.shift;
|
|
85
|
-
this.sort = sort_1.sort;
|
|
86
|
-
this.split = split_1.split;
|
|
87
|
-
this.translate = translate_1.translate;
|
|
88
|
-
this.context = context;
|
|
89
|
-
}
|
|
90
|
-
async deleteDatabase(table, options) {
|
|
91
|
-
return new delete_database_1.DeleteDatabase(this.context).deleteDatabase(table, options);
|
|
92
|
-
}
|
|
93
|
-
async insertDatabase(table, options) {
|
|
94
|
-
return new insert_database_1.InsertDatabase(this.context).insertDatabase(table, options);
|
|
95
|
-
}
|
|
96
|
-
async message(options) {
|
|
97
|
-
return new message_1.MessageStatement(this.context).message(options);
|
|
98
|
-
}
|
|
99
|
-
async modifyDatabase(table, options) {
|
|
100
|
-
return new modify_database_1.ModifyDatabase(this.context).modifyDatabase(table, options);
|
|
101
|
-
}
|
|
102
|
-
async select(target, select, runtimeOptions) {
|
|
103
|
-
return new select_1.SelectDatabase(this.context).select(target, select, runtimeOptions);
|
|
104
|
-
}
|
|
105
|
-
async updateDatabase(table, options) {
|
|
106
|
-
return new update_database_1.UpdateDatabase(this.context).updateDatabase(table, options);
|
|
107
|
-
}
|
|
108
|
-
async callFunction(options) {
|
|
109
|
-
return new call_function_1.CallFunction(this.context).callFunction(options);
|
|
110
|
-
}
|
|
111
|
-
write(source, options) {
|
|
112
|
-
return new write_1.WriteStatement(this.context).write(source, options);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.Statements = Statements;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Statements = void 0;
|
|
4
|
+
const append_1 = require("./append");
|
|
5
|
+
const assert_1 = require("./assert");
|
|
6
|
+
const assign_1 = require("./assign");
|
|
7
|
+
const clear_1 = require("./clear");
|
|
8
|
+
const commit_1 = require("./commit");
|
|
9
|
+
const concatenate_1 = require("./concatenate");
|
|
10
|
+
const condense_1 = require("./condense");
|
|
11
|
+
const convert_1 = require("./convert");
|
|
12
|
+
const create_data_1 = require("./create_data");
|
|
13
|
+
const delete_internal_1 = require("./delete_internal");
|
|
14
|
+
const describe_1 = require("./describe");
|
|
15
|
+
const find_1 = require("./find");
|
|
16
|
+
const collect_1 = require("./collect");
|
|
17
|
+
const overlay_1 = require("./overlay");
|
|
18
|
+
const cast_1 = require("./cast");
|
|
19
|
+
const get_bit_1 = require("./get_bit");
|
|
20
|
+
const read_report_1 = require("./read_report");
|
|
21
|
+
const raise_event_1 = require("./raise_event");
|
|
22
|
+
const get_locale_1 = require("./get_locale");
|
|
23
|
+
const get_parameter_1 = require("./get_parameter");
|
|
24
|
+
const set_locale_1 = require("./set_locale");
|
|
25
|
+
const get_run_time_1 = require("./get_run_time");
|
|
26
|
+
const get_time_1 = require("./get_time");
|
|
27
|
+
const insert_database_1 = require("./insert_database");
|
|
28
|
+
const insert_internal_1 = require("./insert_internal");
|
|
29
|
+
const delete_database_1 = require("./delete_database");
|
|
30
|
+
const loop_1 = require("./loop");
|
|
31
|
+
const message_1 = require("./message");
|
|
32
|
+
const modify_database_1 = require("./modify_database");
|
|
33
|
+
const modify_internal_1 = require("./modify_internal");
|
|
34
|
+
const move_corresponding_1 = require("./move_corresponding");
|
|
35
|
+
const read_table_1 = require("./read_table");
|
|
36
|
+
const replace_1 = require("./replace");
|
|
37
|
+
const rollback_1 = require("./rollback");
|
|
38
|
+
const select_1 = require("./select");
|
|
39
|
+
const set_bit_1 = require("./set_bit");
|
|
40
|
+
const shift_1 = require("./shift");
|
|
41
|
+
const sort_1 = require("./sort");
|
|
42
|
+
const set_handler_1 = require("./set_handler");
|
|
43
|
+
const split_1 = require("./split");
|
|
44
|
+
const translate_1 = require("./translate");
|
|
45
|
+
const update_database_1 = require("./update_database");
|
|
46
|
+
const write_1 = require("./write");
|
|
47
|
+
const call_function_1 = require("./call_function");
|
|
48
|
+
// this is a class, as statements like SELECT needs access to the database object instance
|
|
49
|
+
// and WRITE will access the Console
|
|
50
|
+
class Statements {
|
|
51
|
+
constructor(context) {
|
|
52
|
+
this.append = append_1.append;
|
|
53
|
+
this.assert = assert_1.assert;
|
|
54
|
+
this.assign = assign_1.assign;
|
|
55
|
+
this.cast = cast_1.cast;
|
|
56
|
+
this.clear = clear_1.clear;
|
|
57
|
+
this.collect = collect_1.collect;
|
|
58
|
+
this.commit = commit_1.commit;
|
|
59
|
+
this.concatenate = concatenate_1.concatenate;
|
|
60
|
+
this.condense = condense_1.condense;
|
|
61
|
+
this.convert = convert_1.convert;
|
|
62
|
+
this.createData = create_data_1.createData;
|
|
63
|
+
this.deleteInternal = delete_internal_1.deleteInternal;
|
|
64
|
+
this.describe = describe_1.describe;
|
|
65
|
+
this.find = find_1.find;
|
|
66
|
+
this.getBit = get_bit_1.getBit;
|
|
67
|
+
this.readReport = read_report_1.readReport;
|
|
68
|
+
this.getLocale = get_locale_1.getLocale;
|
|
69
|
+
this.getParameter = get_parameter_1.getParameter;
|
|
70
|
+
this.getRunTime = get_run_time_1.getRunTime;
|
|
71
|
+
this.getTime = get_time_1.getTime;
|
|
72
|
+
this.insertInternal = insert_internal_1.insertInternal;
|
|
73
|
+
this.loop = loop_1.loop;
|
|
74
|
+
this.modifyInternal = modify_internal_1.modifyInternal;
|
|
75
|
+
this.moveCorresponding = move_corresponding_1.moveCorresponding;
|
|
76
|
+
this.overlay = overlay_1.overlay;
|
|
77
|
+
this.raiseEvent = raise_event_1.raiseEvent;
|
|
78
|
+
this.readTable = read_table_1.readTable;
|
|
79
|
+
this.replace = replace_1.replace;
|
|
80
|
+
this.rollback = rollback_1.rollback;
|
|
81
|
+
this.setBit = set_bit_1.setBit;
|
|
82
|
+
this.setHandler = set_handler_1.setHandler;
|
|
83
|
+
this.setLocale = set_locale_1.setLocale;
|
|
84
|
+
this.shift = shift_1.shift;
|
|
85
|
+
this.sort = sort_1.sort;
|
|
86
|
+
this.split = split_1.split;
|
|
87
|
+
this.translate = translate_1.translate;
|
|
88
|
+
this.context = context;
|
|
89
|
+
}
|
|
90
|
+
async deleteDatabase(table, options) {
|
|
91
|
+
return new delete_database_1.DeleteDatabase(this.context).deleteDatabase(table, options);
|
|
92
|
+
}
|
|
93
|
+
async insertDatabase(table, options) {
|
|
94
|
+
return new insert_database_1.InsertDatabase(this.context).insertDatabase(table, options);
|
|
95
|
+
}
|
|
96
|
+
async message(options) {
|
|
97
|
+
return new message_1.MessageStatement(this.context).message(options);
|
|
98
|
+
}
|
|
99
|
+
async modifyDatabase(table, options) {
|
|
100
|
+
return new modify_database_1.ModifyDatabase(this.context).modifyDatabase(table, options);
|
|
101
|
+
}
|
|
102
|
+
async select(target, select, runtimeOptions) {
|
|
103
|
+
return new select_1.SelectDatabase(this.context).select(target, select, runtimeOptions);
|
|
104
|
+
}
|
|
105
|
+
async updateDatabase(table, options) {
|
|
106
|
+
return new update_database_1.UpdateDatabase(this.context).updateDatabase(table, options);
|
|
107
|
+
}
|
|
108
|
+
async callFunction(options) {
|
|
109
|
+
return new call_function_1.CallFunction(this.context).callFunction(options);
|
|
110
|
+
}
|
|
111
|
+
write(source, options) {
|
|
112
|
+
return new write_1.WriteStatement(this.context).write(source, options);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.Statements = Statements;
|
|
116
116
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Context } from "../context";
|
|
2
|
-
import { Structure, Table } from "../types";
|
|
3
|
-
import { ICharacter } from "../types/_character";
|
|
4
|
-
export declare function toValue(value: any): any;
|
|
5
|
-
export interface IInsertDatabaseOptions {
|
|
6
|
-
values?: Structure;
|
|
7
|
-
table?: Table;
|
|
8
|
-
}
|
|
9
|
-
export declare class InsertDatabase {
|
|
10
|
-
private readonly context;
|
|
11
|
-
constructor(context: Context);
|
|
12
|
-
insertDatabase(table: string | ICharacter, options: IInsertDatabaseOptions): Promise<number | undefined>;
|
|
13
|
-
}
|
|
1
|
+
import { Context } from "../context";
|
|
2
|
+
import { Structure, Table } from "../types";
|
|
3
|
+
import { ICharacter } from "../types/_character";
|
|
4
|
+
export declare function toValue(value: any): any;
|
|
5
|
+
export interface IInsertDatabaseOptions {
|
|
6
|
+
values?: Structure;
|
|
7
|
+
table?: Table;
|
|
8
|
+
}
|
|
9
|
+
export declare class InsertDatabase {
|
|
10
|
+
private readonly context;
|
|
11
|
+
constructor(context: Context);
|
|
12
|
+
insertDatabase(table: string | ICharacter, options: IInsertDatabaseOptions): Promise<number | undefined>;
|
|
13
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InsertDatabase = exports.toValue = void 0;
|
|
4
|
-
function toValue(value) {
|
|
5
|
-
if (typeof value === "string") {
|
|
6
|
-
return '"' + value.replace(/"/g, "\"\"") + '"';
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
return value;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.toValue = toValue;
|
|
13
|
-
class InsertDatabase {
|
|
14
|
-
constructor(context) {
|
|
15
|
-
this.context = context;
|
|
16
|
-
}
|
|
17
|
-
async insertDatabase(table, options) {
|
|
18
|
-
const columns = [];
|
|
19
|
-
const values = [];
|
|
20
|
-
if (options.values === undefined && options.table === undefined) {
|
|
21
|
-
throw "insertDatabase, wrong input";
|
|
22
|
-
}
|
|
23
|
-
if (options.table !== undefined) {
|
|
24
|
-
let subrc = 0;
|
|
25
|
-
let dbcnt = 0;
|
|
26
|
-
for (const row of options.table.array()) {
|
|
27
|
-
await this.insertDatabase(table, { values: row });
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
subrc = Math.max(subrc, abap.builtin.sy.get().subrc.get());
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
dbcnt += abap.builtin.sy.get().dbcnt.get();
|
|
32
|
-
}
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
abap.builtin.sy.get().subrc.set(subrc);
|
|
35
|
-
// @ts-ignore
|
|
36
|
-
abap.builtin.sy.get().dbcnt.set(dbcnt);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const structure = options.values.get();
|
|
40
|
-
for (const k of Object.keys(structure)) {
|
|
41
|
-
columns.push(k);
|
|
42
|
-
const value = structure[k].get();
|
|
43
|
-
values.push(toValue(value));
|
|
44
|
-
}
|
|
45
|
-
if (typeof table !== "string") {
|
|
46
|
-
table = table.get();
|
|
47
|
-
}
|
|
48
|
-
const { subrc, dbcnt } = await this.context.defaultDB().insert({ table, columns, values });
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
abap.builtin.sy.get().subrc.set(subrc);
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
abap.builtin.sy.get().dbcnt.set(dbcnt);
|
|
53
|
-
return subrc;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.InsertDatabase = InsertDatabase;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InsertDatabase = exports.toValue = void 0;
|
|
4
|
+
function toValue(value) {
|
|
5
|
+
if (typeof value === "string") {
|
|
6
|
+
return '"' + value.replace(/"/g, "\"\"") + '"';
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.toValue = toValue;
|
|
13
|
+
class InsertDatabase {
|
|
14
|
+
constructor(context) {
|
|
15
|
+
this.context = context;
|
|
16
|
+
}
|
|
17
|
+
async insertDatabase(table, options) {
|
|
18
|
+
const columns = [];
|
|
19
|
+
const values = [];
|
|
20
|
+
if (options.values === undefined && options.table === undefined) {
|
|
21
|
+
throw "insertDatabase, wrong input";
|
|
22
|
+
}
|
|
23
|
+
if (options.table !== undefined) {
|
|
24
|
+
let subrc = 0;
|
|
25
|
+
let dbcnt = 0;
|
|
26
|
+
for (const row of options.table.array()) {
|
|
27
|
+
await this.insertDatabase(table, { values: row });
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
subrc = Math.max(subrc, abap.builtin.sy.get().subrc.get());
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
dbcnt += abap.builtin.sy.get().dbcnt.get();
|
|
32
|
+
}
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
abap.builtin.sy.get().subrc.set(subrc);
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
abap.builtin.sy.get().dbcnt.set(dbcnt);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const structure = options.values.get();
|
|
40
|
+
for (const k of Object.keys(structure)) {
|
|
41
|
+
columns.push(k);
|
|
42
|
+
const value = structure[k].get();
|
|
43
|
+
values.push(toValue(value));
|
|
44
|
+
}
|
|
45
|
+
if (typeof table !== "string") {
|
|
46
|
+
table = table.get();
|
|
47
|
+
}
|
|
48
|
+
const { subrc, dbcnt } = await this.context.defaultDB().insert({ table, columns, values });
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
abap.builtin.sy.get().subrc.set(subrc);
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
abap.builtin.sy.get().dbcnt.set(dbcnt);
|
|
53
|
+
return subrc;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.InsertDatabase = InsertDatabase;
|
|
57
57
|
//# sourceMappingURL=insert_database.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ABAPObject, DataReference, FieldSymbol, Structure, Table } from "../types";
|
|
2
|
-
import { ICharacter } from "../types/_character";
|
|
3
|
-
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export interface IInsertInternalOptions {
|
|
5
|
-
index?: INumeric;
|
|
6
|
-
initial?: boolean;
|
|
7
|
-
data?: INumeric | ICharacter | Structure | ABAPObject | Table | FieldSymbol | string;
|
|
8
|
-
table: Table | FieldSymbol;
|
|
9
|
-
referenceInto?: DataReference;
|
|
10
|
-
assigning?: FieldSymbol;
|
|
11
|
-
lines?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function insertInternal(options: IInsertInternalOptions): void;
|
|
1
|
+
import { ABAPObject, DataReference, FieldSymbol, Structure, Table } from "../types";
|
|
2
|
+
import { ICharacter } from "../types/_character";
|
|
3
|
+
import { INumeric } from "../types/_numeric";
|
|
4
|
+
export interface IInsertInternalOptions {
|
|
5
|
+
index?: INumeric;
|
|
6
|
+
initial?: boolean;
|
|
7
|
+
data?: INumeric | ICharacter | Structure | ABAPObject | Table | FieldSymbol | string;
|
|
8
|
+
table: Table | FieldSymbol;
|
|
9
|
+
referenceInto?: DataReference;
|
|
10
|
+
assigning?: FieldSymbol;
|
|
11
|
+
lines?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function insertInternal(options: IInsertInternalOptions): void;
|