@abaplint/runtime 2.7.117 → 2.7.119
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.
|
@@ -44,7 +44,12 @@ function find(input) {
|
|
|
44
44
|
let negative = false;
|
|
45
45
|
if (occ < 0) {
|
|
46
46
|
negative = true;
|
|
47
|
-
|
|
47
|
+
let reversed = "";
|
|
48
|
+
// this is faster than doing val.split("").reverse().join("")
|
|
49
|
+
for (const character of val) {
|
|
50
|
+
reversed = character + reversed;
|
|
51
|
+
}
|
|
52
|
+
val = reversed;
|
|
48
53
|
occ = Math.abs(occ);
|
|
49
54
|
}
|
|
50
55
|
let found = -1;
|
|
@@ -9,21 +9,19 @@ function substring(input) {
|
|
|
9
9
|
if (off === undefined) {
|
|
10
10
|
off = 0;
|
|
11
11
|
}
|
|
12
|
-
if (off < 0) {
|
|
12
|
+
else if (off < 0) {
|
|
13
13
|
(0, throw_error_1.throwError)("CX_SY_RANGE_OUT_OF_BOUNDS");
|
|
14
14
|
}
|
|
15
15
|
const len = (_b = input === null || input === void 0 ? void 0 : input.len) === null || _b === void 0 ? void 0 : _b.get();
|
|
16
16
|
if (len && len < 0) {
|
|
17
17
|
(0, throw_error_1.throwError)("CX_SY_RANGE_OUT_OF_BOUNDS");
|
|
18
18
|
}
|
|
19
|
-
let sub = "";
|
|
20
19
|
if (typeof input.val === "string") {
|
|
21
|
-
|
|
20
|
+
return new string_1.String().set(input.val.substr(off, len));
|
|
22
21
|
}
|
|
23
22
|
else {
|
|
24
|
-
|
|
23
|
+
return input.val.getOffset({ offset: off, length: len });
|
|
25
24
|
}
|
|
26
|
-
return new string_1.String().set(sub);
|
|
27
25
|
}
|
|
28
26
|
exports.substring = substring;
|
|
29
27
|
//# sourceMappingURL=substring.js.map
|
package/build/src/compare/ca.js
CHANGED
|
@@ -29,10 +29,9 @@ function ca(left, right) {
|
|
|
29
29
|
else {
|
|
30
30
|
r = right.get().toString();
|
|
31
31
|
}
|
|
32
|
-
const characters = r.split("");
|
|
33
32
|
let fdpos = 0;
|
|
34
|
-
for (const c of l
|
|
35
|
-
if (
|
|
33
|
+
for (const c of l) {
|
|
34
|
+
if (r.includes(c) === true) {
|
|
36
35
|
// @ts-ignore
|
|
37
36
|
abap.builtin.sy.get().fdpos.set(fdpos);
|
|
38
37
|
return true;
|
package/build/src/compare/co.js
CHANGED
|
@@ -15,15 +15,14 @@ function co(left, right) {
|
|
|
15
15
|
r = right.toString();
|
|
16
16
|
}
|
|
17
17
|
else if (right instanceof types_1.Structure) {
|
|
18
|
-
r =
|
|
18
|
+
r = right.getCharacter();
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
21
|
r = right.get().toString();
|
|
22
22
|
}
|
|
23
|
-
const characters = r.split("");
|
|
24
23
|
let fdpos = 0;
|
|
25
|
-
for (const c of l
|
|
26
|
-
if (
|
|
24
|
+
for (const c of l) {
|
|
25
|
+
if (r.includes(c) === false) {
|
|
27
26
|
// @ts-ignore
|
|
28
27
|
abap.builtin.sy.get().fdpos.set(fdpos);
|
|
29
28
|
return false;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.insertDatabase = exports.toValue = void 0;
|
|
4
4
|
const prefix_1 = require("../prefix");
|
|
5
|
+
const types_1 = require("../types");
|
|
5
6
|
function toValue(value) {
|
|
6
7
|
if (typeof value === "string") {
|
|
7
8
|
// postgres requires ' for values
|
|
@@ -39,6 +40,10 @@ async function insertDatabase(table, options, context) {
|
|
|
39
40
|
for (const k of Object.keys(structure)) {
|
|
40
41
|
columns.push(k);
|
|
41
42
|
const value = structure[k].get();
|
|
43
|
+
if (value instanceof types_1.Structure) {
|
|
44
|
+
// then its a group, ignore
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
42
47
|
values.push(toValue(value));
|
|
43
48
|
}
|
|
44
49
|
if (typeof table !== "string") {
|