@abaplint/runtime 2.5.60 → 2.5.62
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/builtin/lines.js +1 -1
- package/build/src/compare/gt.d.ts +2 -2
- package/build/src/compare/gt.js +1 -1
- package/build/src/statements/delete_internal.js +3 -0
- package/build/src/statements/loop.js +1 -1
- package/build/src/statements/select.d.ts +2 -2
- package/build/src/statements/select.js +1 -1
- package/build/src/template_formatting.js +1 -1
- package/build/src/types/data_reference.d.ts +1 -0
- package/build/src/types/data_reference.js +5 -0
- package/build/src/types/field_symbol.d.ts +1 -0
- package/build/src/types/field_symbol.js +5 -0
- package/build/src/types/table.d.ts +3 -3
- package/build/src/types/table.js +2 -2
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ function lines(input) {
|
|
|
9
9
|
}
|
|
10
10
|
return lines({ val: input.val.getPointer() });
|
|
11
11
|
}
|
|
12
|
-
return new types_1.Integer().set(input.val.
|
|
12
|
+
return new types_1.Integer().set(input.val.getArrayLength());
|
|
13
13
|
}
|
|
14
14
|
exports.lines = lines;
|
|
15
15
|
//# sourceMappingURL=lines.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ABAPObject, Structure, Table } from "../types";
|
|
1
|
+
import { ABAPObject, HashedTable, Structure, Table } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function gt(left: number | string | ICharacter | INumeric | ABAPObject | Structure | Table, right: number | string | ICharacter | INumeric | ABAPObject | Structure | Table): boolean;
|
|
4
|
+
export declare function gt(left: number | string | ICharacter | INumeric | ABAPObject | Structure | Table | HashedTable, right: number | string | ICharacter | INumeric | ABAPObject | Structure | Table | HashedTable): boolean;
|
package/build/src/compare/gt.js
CHANGED
|
@@ -16,7 +16,7 @@ function gt(left, right) {
|
|
|
16
16
|
}
|
|
17
17
|
return gt(left, right.getPointer());
|
|
18
18
|
}
|
|
19
|
-
if (left instanceof types_1.Table || right instanceof types_1.Table) {
|
|
19
|
+
if (left instanceof types_1.Table || right instanceof types_1.Table || left instanceof types_1.HashedTable || right instanceof types_1.HashedTable) {
|
|
20
20
|
throw new Error("runtime_todo, gt TABLE");
|
|
21
21
|
}
|
|
22
22
|
if (left instanceof types_1.Hex || right instanceof types_1.Hex) {
|
|
@@ -48,6 +48,9 @@ async function deleteInternal(target, options) {
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
if ((options === null || options === void 0 ? void 0 : options.adjacent) === true) {
|
|
51
|
+
if (target instanceof types_1.HashedTable) {
|
|
52
|
+
throw new Error("delete adjacent, hashed table");
|
|
53
|
+
}
|
|
51
54
|
const array = target.array();
|
|
52
55
|
for (let index = array.length - 1; index > 0; index--) {
|
|
53
56
|
const prev = array[index - 1];
|
|
@@ -60,7 +60,7 @@ function loop(table, options) {
|
|
|
60
60
|
yield __await(yield* __asyncDelegator(__asyncValues(loop(pnt, options))));
|
|
61
61
|
return yield __await(void 0);
|
|
62
62
|
}
|
|
63
|
-
const length = table.
|
|
63
|
+
const length = table.getArrayLength();
|
|
64
64
|
if (length === 0) {
|
|
65
65
|
// @ts-ignore
|
|
66
66
|
abap.builtin.sy.get().subrc.set(4);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Context } from "../context";
|
|
2
2
|
import { SelectDatabaseOptions, SelectRuntimeOptions } from "../db/db";
|
|
3
|
-
import { FieldSymbol, Structure, Table } from "../types";
|
|
3
|
+
import { FieldSymbol, HashedTable, Structure, Table } from "../types";
|
|
4
4
|
export declare class SelectDatabase {
|
|
5
5
|
private readonly context;
|
|
6
6
|
constructor(context: Context);
|
|
7
|
-
select(target: Structure | Table | FieldSymbol, input: SelectDatabaseOptions, runtimeOptions?: SelectRuntimeOptions): Promise<void>;
|
|
7
|
+
select(target: Structure | Table | HashedTable | FieldSymbol, input: SelectDatabaseOptions, runtimeOptions?: SelectRuntimeOptions): Promise<void>;
|
|
8
8
|
}
|
|
@@ -36,7 +36,7 @@ class SelectDatabase {
|
|
|
36
36
|
// @ts-ignore
|
|
37
37
|
abap.statements.moveCorresponding(new types_1.Structure(result), target);
|
|
38
38
|
}
|
|
39
|
-
else if (target instanceof types_1.Table) {
|
|
39
|
+
else if (target instanceof types_1.Table || target instanceof types_1.HashedTable) {
|
|
40
40
|
for (const row of rows) {
|
|
41
41
|
const targetRow = (0, clone_1.clone)(target.getRowType());
|
|
42
42
|
if (targetRow instanceof types_1.Structure) {
|
|
@@ -10,7 +10,7 @@ function templateFormatting(source, options) {
|
|
|
10
10
|
}
|
|
11
11
|
return templateFormatting(source.getPointer(), options);
|
|
12
12
|
}
|
|
13
|
-
else if (source instanceof types_1.Table) {
|
|
13
|
+
else if (source instanceof types_1.Table || source instanceof types_1.HashedTable) {
|
|
14
14
|
throw new Error("STRG_ILLEGAL_DATA_TYPE");
|
|
15
15
|
}
|
|
16
16
|
else if (source instanceof types_1.Character) {
|
|
@@ -42,6 +42,11 @@ class DataReference {
|
|
|
42
42
|
// @ts-ignore
|
|
43
43
|
return (_a = this.pointer) === null || _a === void 0 ? void 0 : _a.array();
|
|
44
44
|
}
|
|
45
|
+
getArrayLength() {
|
|
46
|
+
var _a;
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
return (_a = this.pointer) === null || _a === void 0 ? void 0 : _a.getArrayLength();
|
|
49
|
+
}
|
|
45
50
|
set(value) {
|
|
46
51
|
var _a;
|
|
47
52
|
if (value instanceof DataReference) {
|
|
@@ -87,6 +87,11 @@ class FieldSymbol {
|
|
|
87
87
|
// @ts-ignore
|
|
88
88
|
return (_a = this.pointer) === null || _a === void 0 ? void 0 : _a.array();
|
|
89
89
|
}
|
|
90
|
+
getArrayLength() {
|
|
91
|
+
var _a;
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
return (_a = this.pointer) === null || _a === void 0 ? void 0 : _a.getArrayLength();
|
|
94
|
+
}
|
|
90
95
|
set(value) {
|
|
91
96
|
var _a;
|
|
92
97
|
(_a = this.pointer) === null || _a === void 0 ? void 0 : _a.set(value);
|
|
@@ -29,7 +29,7 @@ interface ITable {
|
|
|
29
29
|
getQualifiedName(): string | undefined;
|
|
30
30
|
getOptions(): ITableOptions | undefined;
|
|
31
31
|
getRowType(): TableRowType;
|
|
32
|
-
|
|
32
|
+
getArrayLength(): number;
|
|
33
33
|
clear(): void;
|
|
34
34
|
set(tab: Table | HashedTable | TableRowType): ITable;
|
|
35
35
|
getHeader(): TableRowType;
|
|
@@ -48,7 +48,7 @@ export declare class HashedTable implements ITable {
|
|
|
48
48
|
private readonly qualifiedName;
|
|
49
49
|
private secondaryIndexes;
|
|
50
50
|
constructor(rowType: TableRowType, options: ITableOptions, qualifiedName?: string);
|
|
51
|
-
|
|
51
|
+
getArrayLength(): number;
|
|
52
52
|
getKeyByName(name: string): ITableKey | undefined;
|
|
53
53
|
getSecondaryIndex(name: string): any[];
|
|
54
54
|
buildHashFromData(data: TableRowType): string;
|
|
@@ -83,7 +83,7 @@ export declare class Table implements ITable {
|
|
|
83
83
|
private readonly isStructured;
|
|
84
84
|
private secondaryIndexes;
|
|
85
85
|
constructor(rowType: TableRowType, options: ITableOptions, qualifiedName?: string);
|
|
86
|
-
|
|
86
|
+
getArrayLength(): number;
|
|
87
87
|
getKeyByName(name: string): ITableKey | undefined;
|
|
88
88
|
getSecondaryIndex(name: string): TableRowType[];
|
|
89
89
|
getQualifiedName(): string | undefined;
|
package/build/src/types/table.js
CHANGED
|
@@ -65,7 +65,7 @@ class HashedTable {
|
|
|
65
65
|
}
|
|
66
66
|
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
getArrayLength() {
|
|
69
69
|
return Object.keys(this.value).length;
|
|
70
70
|
}
|
|
71
71
|
getKeyByName(name) {
|
|
@@ -221,7 +221,7 @@ class Table {
|
|
|
221
221
|
}
|
|
222
222
|
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
getArrayLength() {
|
|
225
225
|
return this.value.length;
|
|
226
226
|
}
|
|
227
227
|
getKeyByName(name) {
|