@abaplint/runtime 2.7.50 → 2.7.51
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.
|
@@ -30,7 +30,7 @@ function searchWithKey(arr, withKey, startIndex = 0, usesTableLine) {
|
|
|
30
30
|
}
|
|
31
31
|
/////////////////
|
|
32
32
|
function readTable(table, options) {
|
|
33
|
-
var _a, _b, _c, _d;
|
|
33
|
+
var _a, _b, _c, _d, _e;
|
|
34
34
|
let found = undefined;
|
|
35
35
|
let foundIndex = 0;
|
|
36
36
|
let binarySubrc = undefined;
|
|
@@ -146,13 +146,14 @@ function readTable(table, options) {
|
|
|
146
146
|
foundIndex = searchResult.foundIndex;
|
|
147
147
|
}
|
|
148
148
|
else if (options === null || options === void 0 ? void 0 : options.from) {
|
|
149
|
-
if (options.from instanceof types_1.FieldSymbol) {
|
|
150
|
-
options.from = options.from.getPointer();
|
|
151
|
-
}
|
|
152
149
|
if (table instanceof types_1.HashedTable) {
|
|
153
150
|
throw new Error("runtime, todo readTable Hashed FROM");
|
|
154
151
|
}
|
|
152
|
+
if (options.from instanceof types_1.FieldSymbol) {
|
|
153
|
+
options.from = options.from.getPointer();
|
|
154
|
+
}
|
|
155
155
|
if (table instanceof types_1.Table && options.from instanceof types_1.Structure) {
|
|
156
|
+
// todo: optimize if the primary key is sorted
|
|
156
157
|
const arr = table.array();
|
|
157
158
|
const keys = (_d = (_c = table.getOptions()) === null || _c === void 0 ? void 0 : _c.primaryKey) === null || _d === void 0 ? void 0 : _d.keyFields;
|
|
158
159
|
const isStructured = arr[0] instanceof types_1.Structure;
|
|
@@ -178,6 +179,9 @@ function readTable(table, options) {
|
|
|
178
179
|
if (found === undefined) {
|
|
179
180
|
foundIndex = 0;
|
|
180
181
|
}
|
|
182
|
+
if (found === undefined && ((_e = table.getOptions().primaryKey) === null || _e === void 0 ? void 0 : _e.type) === types_1.TableAccessType.sorted) {
|
|
183
|
+
binarySubrc = 8;
|
|
184
|
+
}
|
|
181
185
|
}
|
|
182
186
|
else {
|
|
183
187
|
throw new Error("runtime, readTable, unexpected input");
|
|
@@ -186,7 +190,7 @@ function readTable(table, options) {
|
|
|
186
190
|
if (binarySubrc) {
|
|
187
191
|
subrc = binarySubrc;
|
|
188
192
|
}
|
|
189
|
-
else if (((options === null || options === void 0 ? void 0 : options.
|
|
193
|
+
else if (((options === null || options === void 0 ? void 0 : options.binarySearch) === true || (options === null || options === void 0 ? void 0 : options.keyName) !== undefined)
|
|
190
194
|
&& subrc === 4) {
|
|
191
195
|
subrc = 8;
|
|
192
196
|
}
|
|
@@ -8,6 +8,7 @@ const field_symbol_1 = require("./field_symbol");
|
|
|
8
8
|
const integer_1 = require("./integer");
|
|
9
9
|
const packed_1 = require("./packed");
|
|
10
10
|
const structure_1 = require("./structure");
|
|
11
|
+
const float_1 = require("./float");
|
|
11
12
|
class String {
|
|
12
13
|
constructor(input) {
|
|
13
14
|
this.value = "";
|
|
@@ -46,6 +47,10 @@ class String {
|
|
|
46
47
|
this.value = Math.abs(value.get()) + "";
|
|
47
48
|
this.value += lv_sign;
|
|
48
49
|
}
|
|
50
|
+
else if (value instanceof float_1.Float) {
|
|
51
|
+
this.value = value.get() + "";
|
|
52
|
+
this.value = this.value.replace(",", ".");
|
|
53
|
+
}
|
|
49
54
|
else {
|
|
50
55
|
this.value = value.get() + "";
|
|
51
56
|
}
|