@abaplint/runtime 2.10.46 → 2.10.48
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/clone.js +2 -0
- package/build/src/statements/insert_internal.js +1 -1
- package/build/src/types/_character.d.ts +1 -0
- package/build/src/types/_numeric.d.ts +1 -0
- package/build/src/types/data_reference.js +1 -4
- package/build/src/types/date.d.ts +1 -0
- package/build/src/types/date.js +5 -0
- package/build/src/types/decfloat34.d.ts +1 -0
- package/build/src/types/decfloat34.js +5 -0
- package/build/src/types/field_symbol.d.ts +1 -0
- package/build/src/types/field_symbol.js +3 -0
- package/build/src/types/float.d.ts +1 -0
- package/build/src/types/float.js +5 -0
- package/build/src/types/hex.d.ts +1 -0
- package/build/src/types/hex.js +5 -0
- package/build/src/types/integer8.d.ts +1 -0
- package/build/src/types/integer8.js +6 -0
- package/build/src/types/numc.d.ts +1 -0
- package/build/src/types/numc.js +6 -0
- package/build/src/types/packed.d.ts +1 -0
- package/build/src/types/packed.js +5 -0
- package/build/src/types/string.d.ts +1 -0
- package/build/src/types/string.js +5 -0
- package/build/src/types/structure.d.ts +6 -2
- package/build/src/types/structure.js +8 -1
- package/build/src/types/table.d.ts +2 -0
- package/build/src/types/table.js +15 -0
- package/build/src/types/time.d.ts +1 -0
- package/build/src/types/time.js +5 -0
- package/build/src/types/utc_long.d.ts +1 -0
- package/build/src/types/utc_long.js +5 -0
- package/build/src/types/xstring.d.ts +1 -0
- package/build/src/types/xstring.js +5 -0
- package/package.json +1 -1
package/build/src/clone.js
CHANGED
|
@@ -13,7 +13,7 @@ function insertInternal(options) {
|
|
|
13
13
|
}
|
|
14
14
|
options.table = options.table.getPointer();
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
if (options.data instanceof types_1.FieldSymbol) {
|
|
17
17
|
if (options.data.getPointer() === undefined) {
|
|
18
18
|
throw new Error("GETWA_NOT_ASSIGNED");
|
|
19
19
|
}
|
package/build/src/types/date.js
CHANGED
|
@@ -10,6 +10,11 @@ class Date {
|
|
|
10
10
|
this.clear();
|
|
11
11
|
this.qualifiedName = input?.qualifiedName;
|
|
12
12
|
}
|
|
13
|
+
clone() {
|
|
14
|
+
const n = new Date({ qualifiedName: this.qualifiedName });
|
|
15
|
+
n.value = this.value;
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
13
18
|
getQualifiedName() {
|
|
14
19
|
return this.qualifiedName;
|
|
15
20
|
}
|
package/build/src/types/float.js
CHANGED
|
@@ -24,6 +24,11 @@ class Float {
|
|
|
24
24
|
this.value = 0;
|
|
25
25
|
this.qualifiedName = input?.qualifiedName;
|
|
26
26
|
}
|
|
27
|
+
clone() {
|
|
28
|
+
const n = new Float({ qualifiedName: this.qualifiedName });
|
|
29
|
+
n.value = this.value;
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
27
32
|
getQualifiedName() {
|
|
28
33
|
return this.qualifiedName;
|
|
29
34
|
}
|
package/build/src/types/hex.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class Hex implements ICharacter {
|
|
|
12
12
|
length?: number;
|
|
13
13
|
qualifiedName?: string;
|
|
14
14
|
});
|
|
15
|
+
clone(): Hex;
|
|
15
16
|
getQualifiedName(): string | undefined;
|
|
16
17
|
set(value: ICharacter | INumeric | string | number | Integer | Integer8 | Float | Hex | XString): Hex;
|
|
17
18
|
getLength(): number;
|
package/build/src/types/hex.js
CHANGED
|
@@ -13,6 +13,11 @@ class Hex {
|
|
|
13
13
|
this.qualifiedName = input?.qualifiedName;
|
|
14
14
|
this.clear();
|
|
15
15
|
}
|
|
16
|
+
clone() {
|
|
17
|
+
const n = new Hex({ length: this.length, qualifiedName: this.qualifiedName });
|
|
18
|
+
n.value = this.value;
|
|
19
|
+
return n;
|
|
20
|
+
}
|
|
16
21
|
getQualifiedName() {
|
|
17
22
|
return this.qualifiedName;
|
|
18
23
|
}
|
|
@@ -9,6 +9,7 @@ export declare class Integer8 {
|
|
|
9
9
|
constructor(input?: {
|
|
10
10
|
qualifiedName?: string;
|
|
11
11
|
});
|
|
12
|
+
clone(): Integer8;
|
|
12
13
|
getQualifiedName(): string | undefined;
|
|
13
14
|
set(value: INumeric | ICharacter | Hex | string | number | bigint | Integer8 | Integer | Float): this;
|
|
14
15
|
clear(): void;
|
|
@@ -15,6 +15,12 @@ class Integer8 {
|
|
|
15
15
|
this.value = 0n;
|
|
16
16
|
this.qualifiedName = input?.qualifiedName;
|
|
17
17
|
}
|
|
18
|
+
clone() {
|
|
19
|
+
const n = new Integer8({ qualifiedName: this.qualifiedName });
|
|
20
|
+
// set without trigger checks and padding
|
|
21
|
+
n.value = this.value;
|
|
22
|
+
return n;
|
|
23
|
+
}
|
|
18
24
|
getQualifiedName() {
|
|
19
25
|
return this.qualifiedName;
|
|
20
26
|
}
|
|
@@ -9,6 +9,7 @@ export declare class Numc implements ICharacter {
|
|
|
9
9
|
length?: number;
|
|
10
10
|
qualifiedName?: string;
|
|
11
11
|
});
|
|
12
|
+
clone(): Numc;
|
|
12
13
|
getQualifiedName(): string | undefined;
|
|
13
14
|
set(value: INumeric | ICharacter | Hex | string | number, raw?: boolean): this;
|
|
14
15
|
getLength(): number;
|
package/build/src/types/numc.js
CHANGED
|
@@ -10,6 +10,12 @@ class Numc {
|
|
|
10
10
|
this.qualifiedName = input?.qualifiedName;
|
|
11
11
|
this.clear();
|
|
12
12
|
}
|
|
13
|
+
clone() {
|
|
14
|
+
const n = new Numc({ length: this.length, qualifiedName: this.qualifiedName });
|
|
15
|
+
// set without trigger checks and padding
|
|
16
|
+
n.value = this.value;
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
13
19
|
getQualifiedName() {
|
|
14
20
|
return this.qualifiedName;
|
|
15
21
|
}
|
|
@@ -18,6 +18,11 @@ class Packed {
|
|
|
18
18
|
}
|
|
19
19
|
this.qualifiedName = input?.qualifiedName;
|
|
20
20
|
}
|
|
21
|
+
clone() {
|
|
22
|
+
const n = new Packed({ length: this.length, decimals: this.decimals, qualifiedName: this.qualifiedName });
|
|
23
|
+
n.value = this.value;
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
21
26
|
getQualifiedName() {
|
|
22
27
|
return this.qualifiedName;
|
|
23
28
|
}
|
|
@@ -14,6 +14,11 @@ class String {
|
|
|
14
14
|
this.value = "";
|
|
15
15
|
this.qualifiedName = input?.qualifiedName;
|
|
16
16
|
}
|
|
17
|
+
clone() {
|
|
18
|
+
const n = new String({ qualifiedName: this.qualifiedName });
|
|
19
|
+
n.value = this.value;
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
17
22
|
getQualifiedName() {
|
|
18
23
|
return this.qualifiedName;
|
|
19
24
|
}
|
|
@@ -10,7 +10,9 @@ export declare class Structure {
|
|
|
10
10
|
private readonly ddicName;
|
|
11
11
|
private readonly suffix;
|
|
12
12
|
private readonly asInclude;
|
|
13
|
-
constructor(fields:
|
|
13
|
+
constructor(fields: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}, qualifiedName?: string, ddicName?: string, suffix?: any, asInclude?: any);
|
|
14
16
|
clone(): Structure;
|
|
15
17
|
clear(): this;
|
|
16
18
|
getDDICName(): string | undefined;
|
|
@@ -23,7 +25,9 @@ export declare class Structure {
|
|
|
23
25
|
getQualifiedName(): string | undefined;
|
|
24
26
|
set(input: Structure | string | INumeric | Table | ICharacter | FieldSymbol | undefined): this | undefined;
|
|
25
27
|
private setCharacter;
|
|
26
|
-
get():
|
|
28
|
+
get(): {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
};
|
|
27
31
|
getCharacter(): string;
|
|
28
32
|
getOffset(input: {
|
|
29
33
|
offset?: number | INumeric | Hex;
|
|
@@ -16,7 +16,14 @@ class Structure {
|
|
|
16
16
|
this.asInclude = asInclude;
|
|
17
17
|
}
|
|
18
18
|
clone() {
|
|
19
|
-
const
|
|
19
|
+
const newValues = {};
|
|
20
|
+
for (const key in this.value) {
|
|
21
|
+
if (this.value[key] === undefined) {
|
|
22
|
+
throw new Error("Structure, clone: value is undefined, field " + key);
|
|
23
|
+
}
|
|
24
|
+
newValues[key] = this.value[key].clone();
|
|
25
|
+
}
|
|
26
|
+
const n = new Structure(newValues, this.qualifiedName, this.ddicName, this.suffix, this.asInclude);
|
|
20
27
|
return n;
|
|
21
28
|
}
|
|
22
29
|
clear() {
|
|
@@ -55,6 +55,7 @@ export declare class HashedTable implements ITable {
|
|
|
55
55
|
private readonly isStructured;
|
|
56
56
|
private secondaryIndexes;
|
|
57
57
|
constructor(rowType: TableRowType, options: ITableOptions, qualifiedName?: string);
|
|
58
|
+
clone(): HashedTable;
|
|
58
59
|
getArrayLength(): number;
|
|
59
60
|
getKeyByName(name: string): ITableKey | undefined;
|
|
60
61
|
getSecondaryIndex(name: string): any[];
|
|
@@ -92,6 +93,7 @@ export declare class Table implements ITable {
|
|
|
92
93
|
private readonly isStructured;
|
|
93
94
|
private secondaryIndexes;
|
|
94
95
|
constructor(rowType: TableRowType, options: ITableOptions, qualifiedName?: string);
|
|
96
|
+
clone(): Table;
|
|
95
97
|
getArrayLength(): number;
|
|
96
98
|
getKeyByName(name: string): ITableKey | undefined;
|
|
97
99
|
getSecondaryIndex(name: string): TableRowType[];
|
package/build/src/types/table.js
CHANGED
|
@@ -77,6 +77,13 @@ class HashedTable {
|
|
|
77
77
|
}
|
|
78
78
|
this.qualifiedName = qualifiedName?.toUpperCase();
|
|
79
79
|
}
|
|
80
|
+
clone() {
|
|
81
|
+
const copy = new HashedTable(this.rowType, this.options, this.qualifiedName);
|
|
82
|
+
for (const hash in this.value) {
|
|
83
|
+
copy.value[hash] = this.value[hash].clone();
|
|
84
|
+
}
|
|
85
|
+
return copy;
|
|
86
|
+
}
|
|
80
87
|
getArrayLength() {
|
|
81
88
|
return Object.keys(this.value).length;
|
|
82
89
|
}
|
|
@@ -302,6 +309,14 @@ class Table {
|
|
|
302
309
|
}
|
|
303
310
|
this.qualifiedName = qualifiedName?.toUpperCase();
|
|
304
311
|
}
|
|
312
|
+
clone() {
|
|
313
|
+
const copy = new Table(this.rowType, this.options, this.qualifiedName);
|
|
314
|
+
for (const val of this.value) {
|
|
315
|
+
// @ts-ignore
|
|
316
|
+
copy.value.push(val.clone());
|
|
317
|
+
}
|
|
318
|
+
return copy;
|
|
319
|
+
}
|
|
305
320
|
getArrayLength() {
|
|
306
321
|
return this.value.length;
|
|
307
322
|
}
|
package/build/src/types/time.js
CHANGED
|
@@ -9,6 +9,11 @@ class Time {
|
|
|
9
9
|
this.clear();
|
|
10
10
|
this.qualifiedName = input?.qualifiedName;
|
|
11
11
|
}
|
|
12
|
+
clone() {
|
|
13
|
+
const n = new Time({ qualifiedName: this.qualifiedName });
|
|
14
|
+
n.value = this.value;
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
12
17
|
getQualifiedName() {
|
|
13
18
|
return this.qualifiedName;
|
|
14
19
|
}
|
|
@@ -6,6 +6,11 @@ class UTCLong {
|
|
|
6
6
|
this.clear();
|
|
7
7
|
this.qualifiedName = input?.qualifiedName;
|
|
8
8
|
}
|
|
9
|
+
clone() {
|
|
10
|
+
const n = new UTCLong({ qualifiedName: this.qualifiedName });
|
|
11
|
+
n.value = this.value;
|
|
12
|
+
return n;
|
|
13
|
+
}
|
|
9
14
|
getQualifiedName() {
|
|
10
15
|
return this.qualifiedName;
|
|
11
16
|
}
|
|
@@ -11,6 +11,11 @@ class XString {
|
|
|
11
11
|
this.value = "";
|
|
12
12
|
this.qualifiedName = input?.qualifiedName;
|
|
13
13
|
}
|
|
14
|
+
clone() {
|
|
15
|
+
const n = new XString({ qualifiedName: this.qualifiedName });
|
|
16
|
+
n.value = this.value;
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
14
19
|
getQualifiedName() {
|
|
15
20
|
return this.qualifiedName;
|
|
16
21
|
}
|