@abaplint/runtime 2.13.78 → 2.13.81
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.count = count;
|
|
4
|
+
const abap_regex_1 = require("../abap_regex");
|
|
4
5
|
const compare_1 = require("../compare");
|
|
5
6
|
const types_1 = require("../types");
|
|
6
7
|
function count(input) {
|
|
@@ -16,8 +17,7 @@ function count(input) {
|
|
|
16
17
|
}
|
|
17
18
|
let reg = "";
|
|
18
19
|
if (input.sub) {
|
|
19
|
-
reg = input.sub.get();
|
|
20
|
-
reg = reg.replace(/\*/g, "\\*");
|
|
20
|
+
reg = abap_regex_1.ABAPRegExp.escapeRegExp(input.sub.get());
|
|
21
21
|
}
|
|
22
22
|
else if (input.regex) {
|
|
23
23
|
reg = input.regex.get();
|
package/build/src/db/db.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface SelectDatabaseOptions {
|
|
|
20
20
|
}
|
|
21
21
|
export interface SelectRuntimeOptions {
|
|
22
22
|
appending?: boolean;
|
|
23
|
+
/** INTO CORRESPONDING FIELDS OF work area, components not in the field list are left untouched */
|
|
24
|
+
corresponding?: boolean;
|
|
23
25
|
}
|
|
24
26
|
export type DatabaseValue = number | string | Uint8Array | null;
|
|
25
27
|
export type DatabaseRow = {
|
|
@@ -22,7 +22,10 @@ async function select(target, input, runtimeOptions, context) {
|
|
|
22
22
|
abap.builtin.sy.get().subrc.set(4);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
// INTO CORRESPONDING FIELDS OF only assigns the identically named components,
|
|
26
|
+
// the rest of the work area is left untouched
|
|
27
|
+
const keepTarget = runtimeOptions?.corresponding === true && target instanceof types_1.Structure;
|
|
28
|
+
if (runtimeOptions?.appending !== true && keepTarget === false) {
|
|
26
29
|
if (Array.isArray(target)) {
|
|
27
30
|
target.forEach(f => f.clear());
|
|
28
31
|
}
|