@abaplint/runtime 2.8.26 → 2.8.28
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/binary_search.js +3 -4
- package/build/src/builtin/abs.js +1 -2
- package/build/src/builtin/boolc.js +1 -2
- package/build/src/builtin/ceil.js +1 -2
- package/build/src/builtin/concat_lines_of.js +1 -2
- package/build/src/builtin/condense.js +1 -2
- package/build/src/builtin/contains.js +1 -2
- package/build/src/builtin/cos.js +1 -2
- package/build/src/builtin/count.js +1 -2
- package/build/src/builtin/count_any_of.js +1 -2
- package/build/src/builtin/escape.js +1 -2
- package/build/src/builtin/find.js +1 -2
- package/build/src/builtin/floor.js +1 -2
- package/build/src/builtin/frac.js +1 -2
- package/build/src/builtin/insert.js +1 -2
- package/build/src/builtin/ipow.js +1 -2
- package/build/src/builtin/lines.js +1 -2
- package/build/src/builtin/match.js +1 -2
- package/build/src/builtin/matches.js +1 -2
- package/build/src/builtin/nmax.js +1 -2
- package/build/src/builtin/nmin.js +1 -2
- package/build/src/builtin/numofchar.js +1 -2
- package/build/src/builtin/repeat.js +1 -2
- package/build/src/builtin/replace.js +1 -2
- package/build/src/builtin/reverse.js +1 -2
- package/build/src/builtin/round.js +1 -2
- package/build/src/builtin/segment.js +1 -2
- package/build/src/builtin/shift_left.js +1 -2
- package/build/src/builtin/shift_right.js +1 -2
- package/build/src/builtin/sign.js +1 -2
- package/build/src/builtin/sin.js +1 -2
- package/build/src/builtin/sqrt.js +1 -2
- package/build/src/builtin/strlen.js +1 -2
- package/build/src/builtin/substring.js +1 -2
- package/build/src/builtin/substring_after.js +1 -2
- package/build/src/builtin/substring_before.js +1 -2
- package/build/src/builtin/tan.js +1 -2
- package/build/src/builtin/to_lower.js +1 -2
- package/build/src/builtin/to_mixed.js +1 -2
- package/build/src/builtin/to_upper.js +1 -2
- package/build/src/builtin/translate.js +1 -2
- package/build/src/builtin/trunc.js +1 -2
- package/build/src/builtin/xstrlen.js +1 -2
- package/build/src/clone.js +1 -2
- package/build/src/compare/assigned.js +1 -2
- package/build/src/compare/between.js +1 -2
- package/build/src/compare/ca.js +1 -2
- package/build/src/compare/cn.js +1 -2
- package/build/src/compare/co.js +1 -2
- package/build/src/compare/cp.js +1 -2
- package/build/src/compare/cs.js +1 -2
- package/build/src/compare/eq.js +1 -2
- package/build/src/compare/ge.js +1 -2
- package/build/src/compare/gt.js +1 -2
- package/build/src/compare/in.js +1 -2
- package/build/src/compare/initial.js +1 -2
- package/build/src/compare/instance_of.js +1 -2
- package/build/src/compare/le.js +1 -2
- package/build/src/compare/lt.js +1 -2
- package/build/src/compare/m.js +2 -3
- package/build/src/compare/na.js +1 -2
- package/build/src/compare/ne.js +1 -2
- package/build/src/compare/np.js +1 -2
- package/build/src/compare/ns.js +1 -2
- package/build/src/compare/o.js +1 -2
- package/build/src/compare/z.js +1 -2
- package/build/src/expand_dynamic.js +1 -2
- package/build/src/expand_in.js +1 -2
- package/build/src/operators/_bit_operations.js +1 -2
- package/build/src/operators/_parse.js +1 -2
- package/build/src/operators/add.js +1 -2
- package/build/src/operators/bit-and.js +1 -2
- package/build/src/operators/bit-not.js +1 -2
- package/build/src/operators/bit-or.js +1 -2
- package/build/src/operators/bit-xor.js +1 -2
- package/build/src/operators/concat.js +1 -2
- package/build/src/operators/div.js +1 -2
- package/build/src/operators/divide.js +1 -2
- package/build/src/operators/minus.js +1 -2
- package/build/src/operators/mod.js +1 -2
- package/build/src/operators/multiply.js +1 -2
- package/build/src/operators/power.js +1 -2
- package/build/src/prefix.js +1 -2
- package/build/src/statements/append.js +1 -2
- package/build/src/statements/assert.js +1 -2
- package/build/src/statements/assign.js +1 -2
- package/build/src/statements/call_transaction.js +1 -2
- package/build/src/statements/cast.js +1 -2
- package/build/src/statements/clear.js +1 -2
- package/build/src/statements/close_cursor.js +1 -2
- package/build/src/statements/collect.js +1 -2
- package/build/src/statements/commit.js +1 -2
- package/build/src/statements/concatenate.js +1 -2
- package/build/src/statements/condense.js +1 -2
- package/build/src/statements/convert.js +1 -2
- package/build/src/statements/create_data.js +1 -2
- package/build/src/statements/delete_database.js +1 -2
- package/build/src/statements/delete_internal.js +1 -2
- package/build/src/statements/describe.js +1 -2
- package/build/src/statements/fetch_next_cursor.js +1 -2
- package/build/src/statements/find.js +1 -2
- package/build/src/statements/get_bit.js +1 -2
- package/build/src/statements/get_locale.js +1 -2
- package/build/src/statements/get_parameter.js +1 -2
- package/build/src/statements/get_run_time.js +1 -2
- package/build/src/statements/get_time.js +1 -2
- package/build/src/statements/insert_database.js +2 -3
- package/build/src/statements/insert_internal.js +1 -2
- package/build/src/statements/loop.js +1 -2
- package/build/src/statements/modify_database.js +1 -2
- package/build/src/statements/modify_internal.js +1 -2
- package/build/src/statements/move_corresponding.js +1 -2
- package/build/src/statements/open_cursor.js +1 -2
- package/build/src/statements/overlay.js +1 -2
- package/build/src/statements/raise_event.js +1 -2
- package/build/src/statements/read_report.js +1 -2
- package/build/src/statements/read_table.js +1 -2
- package/build/src/statements/receive.js +2 -3
- package/build/src/statements/replace.js +1 -2
- package/build/src/statements/rollback.js +1 -2
- package/build/src/statements/select.js +2 -3
- package/build/src/statements/set_bit.js +1 -2
- package/build/src/statements/set_handler.js +1 -2
- package/build/src/statements/set_locale.js +1 -2
- package/build/src/statements/shift.js +1 -2
- package/build/src/statements/sort.js +1 -2
- package/build/src/statements/split.js +1 -2
- package/build/src/statements/translate.js +1 -2
- package/build/src/statements/unpack.js +1 -2
- package/build/src/statements/update_database.js +1 -2
- package/build/src/statements/wait.js +1 -2
- package/build/src/template_formatting.js +1 -2
- package/build/src/throw_error.js +1 -2
- package/build/src/types/_date_helper.js +2 -3
- package/build/src/types/integer.js +2 -2
- package/build/src/types/table.js +29 -31
- package/package.json +4 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Integer = exports.
|
|
3
|
+
exports.Integer = exports.MIN_INTEGER = exports.MAX_INTEGER = exports.DIGITS = void 0;
|
|
4
|
+
exports.toInteger = toInteger;
|
|
4
5
|
const throw_error_1 = require("../throw_error");
|
|
5
6
|
const float_1 = require("./float");
|
|
6
7
|
const hex_1 = require("./hex");
|
|
@@ -27,7 +28,6 @@ function toInteger(value, exception = true) {
|
|
|
27
28
|
}
|
|
28
29
|
return Math.round(parseFloat(value));
|
|
29
30
|
}
|
|
30
|
-
exports.toInteger = toInteger;
|
|
31
31
|
class Integer {
|
|
32
32
|
constructor(input) {
|
|
33
33
|
this.constant = false;
|
package/build/src/types/table.js
CHANGED
|
@@ -131,45 +131,43 @@ class HashedTable {
|
|
|
131
131
|
}
|
|
132
132
|
buildHashFromSimple(data) {
|
|
133
133
|
let hash = "";
|
|
134
|
-
const
|
|
134
|
+
const tableRowType = this.getRowType();
|
|
135
135
|
for (const k of this.options.primaryKey.keyFields) {
|
|
136
136
|
let val = data[k.toLowerCase()];
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
// convert to correct type, eg Chars have specific length, or rounding,
|
|
138
|
+
if (k === "TABLE_LINE") {
|
|
139
|
+
const row = (0, clone_1.clone)(tableRowType);
|
|
140
|
+
row.set(val.get());
|
|
141
|
+
val = row.get();
|
|
139
142
|
}
|
|
140
|
-
else {
|
|
141
|
-
|
|
142
|
-
if
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
else if (tableRowType instanceof structure_1.Structure) {
|
|
144
|
+
const field = tableRowType.get()[k.toLowerCase()];
|
|
145
|
+
// if types match, there is no need to clone
|
|
146
|
+
if (field instanceof string_1.String && val instanceof string_1.String) {
|
|
147
|
+
val = val.get();
|
|
148
|
+
}
|
|
149
|
+
else if (field instanceof character_1.Character && val instanceof character_1.Character && field.getLength() === val.getLength()) {
|
|
150
|
+
val = val.get();
|
|
151
|
+
}
|
|
152
|
+
else if (field instanceof hex_1.Hex && val instanceof hex_1.Hex && field.getLength() === val.getLength()) {
|
|
153
|
+
val = val.get();
|
|
154
|
+
}
|
|
155
|
+
else if (field instanceof hex_uint8_1.HexUInt8 && val instanceof hex_uint8_1.HexUInt8 && field.getLength() === val.getLength()) {
|
|
156
|
+
val = val.get();
|
|
146
157
|
}
|
|
147
|
-
else if (
|
|
148
|
-
|
|
149
|
-
// if types match, there is no need to clone
|
|
150
|
-
if (field instanceof string_1.String && val instanceof string_1.String) {
|
|
151
|
-
val = val.get();
|
|
152
|
-
}
|
|
153
|
-
else if (field instanceof character_1.Character && val instanceof character_1.Character && field.getLength() === val.getLength()) {
|
|
154
|
-
val = val.get();
|
|
155
|
-
}
|
|
156
|
-
else if (field instanceof hex_1.Hex && val instanceof hex_1.Hex && field.getLength() === val.getLength()) {
|
|
157
|
-
val = val.get();
|
|
158
|
-
}
|
|
159
|
-
else if (field instanceof hex_uint8_1.HexUInt8 && val instanceof hex_uint8_1.HexUInt8 && field.getLength() === val.getLength()) {
|
|
160
|
-
val = val.get();
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
// convert
|
|
164
|
-
const rowType = (0, clone_1.clone)(field);
|
|
165
|
-
rowType.set(val.get());
|
|
166
|
-
val = rowType.get();
|
|
167
|
-
}
|
|
158
|
+
else if (val instanceof structure_1.Structure) {
|
|
159
|
+
val = val.getCharacter();
|
|
168
160
|
}
|
|
169
161
|
else {
|
|
170
|
-
|
|
162
|
+
// convert
|
|
163
|
+
const row = (0, clone_1.clone)(field);
|
|
164
|
+
row.set(val.get());
|
|
165
|
+
val = row.get();
|
|
171
166
|
}
|
|
172
167
|
}
|
|
168
|
+
else {
|
|
169
|
+
throw new Error("HashedTable, buildHashFromSimple, unexpected type");
|
|
170
|
+
}
|
|
173
171
|
hash += k + ":" + val + "|";
|
|
174
172
|
}
|
|
175
173
|
return hash;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.28",
|
|
4
4
|
"description": "Transpiler - Runtime",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/chai": "^4.3.16",
|
|
33
|
-
"@types/mocha": "^10.0.
|
|
33
|
+
"@types/mocha": "^10.0.7",
|
|
34
34
|
"chai": "^4.4.1",
|
|
35
|
-
"mocha": "^10.
|
|
35
|
+
"mocha": "^10.6.0",
|
|
36
36
|
"source-map-support": "^0.5.21",
|
|
37
|
-
"typescript": "^5.
|
|
37
|
+
"typescript": "^5.5.3"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"temporal-polyfill": "^0.2.5"
|