@abaplint/runtime 2.4.10 → 2.4.12
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.
|
@@ -2,8 +2,6 @@ import { INumeric } from "./_numeric";
|
|
|
2
2
|
import { ICharacter } from "./_character";
|
|
3
3
|
import { ABAPObject } from "./abap_object";
|
|
4
4
|
import { Structure } from "./structure";
|
|
5
|
-
import { FieldSymbol } from "./field_symbol";
|
|
6
|
-
import { DataReference } from "./data_reference";
|
|
7
5
|
export declare enum TableAccessType {
|
|
8
6
|
standard = "STANDARD",
|
|
9
7
|
sorted = "SORTED",
|
|
@@ -48,9 +46,9 @@ export declare class Table {
|
|
|
48
46
|
clear(): void;
|
|
49
47
|
set(tab: Table | TableRowType): void;
|
|
50
48
|
getHeader(): TableRowType;
|
|
51
|
-
insertIndex(item: TableRowType, index: number):
|
|
49
|
+
insertIndex(item: TableRowType, index: number): any;
|
|
52
50
|
deleteIndex(index: number): void;
|
|
53
|
-
append(item: TableRowType):
|
|
51
|
+
append(item: TableRowType): any;
|
|
54
52
|
appendInitial(): TableRowType;
|
|
55
53
|
sort(compareFn: (a: TableRowType, b: TableRowType) => number): void;
|
|
56
54
|
private getValue;
|
package/build/src/types/table.js
CHANGED
|
@@ -115,6 +115,14 @@ class Table {
|
|
|
115
115
|
}
|
|
116
116
|
insertIndex(item, index) {
|
|
117
117
|
this.secondaryIndexes = {};
|
|
118
|
+
if (item instanceof field_symbol_1.FieldSymbol) {
|
|
119
|
+
const p = item.getPointer();
|
|
120
|
+
if (p === undefined) {
|
|
121
|
+
throw new Error("insertIndex, fs not assigned");
|
|
122
|
+
}
|
|
123
|
+
this.insertIndex(p, index);
|
|
124
|
+
return p;
|
|
125
|
+
}
|
|
118
126
|
const val = this.getValue(item);
|
|
119
127
|
if (index === 0) {
|
|
120
128
|
this.value.unshift(val);
|
|
@@ -156,8 +164,8 @@ class Table {
|
|
|
156
164
|
if (p === undefined) {
|
|
157
165
|
throw new Error("APPEND, fs not assigned");
|
|
158
166
|
}
|
|
159
|
-
this.
|
|
160
|
-
return
|
|
167
|
+
this.append(p);
|
|
168
|
+
return p;
|
|
161
169
|
}
|
|
162
170
|
else if (item instanceof data_reference_1.DataReference) {
|
|
163
171
|
const ref = new data_reference_1.DataReference(item.getType());
|
|
@@ -197,7 +205,7 @@ class Table {
|
|
|
197
205
|
// @ts-ignore
|
|
198
206
|
// eslint-disable-next-line max-len
|
|
199
207
|
}
|
|
200
|
-
else if (this.isStructured === true && item.getQualifiedName && this.rowType.getQualifiedName && item.getQualifiedName() === this.rowType.getQualifiedName()) {
|
|
208
|
+
else if (this.isStructured === true && item.getQualifiedName && this.rowType.getQualifiedName && item.getQualifiedName() !== "" && item.getQualifiedName() === this.rowType.getQualifiedName()) {
|
|
201
209
|
// types match, so no need to do conversions, just clone the item
|
|
202
210
|
const val = (0, clone_1.clone)(item);
|
|
203
211
|
return val;
|