@abaplint/core 2.102.6 → 2.102.7
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/abaplint.d.ts
CHANGED
|
@@ -6120,6 +6120,7 @@ declare class TableType extends AbstractObject {
|
|
|
6120
6120
|
};
|
|
6121
6121
|
getDescription(): string | undefined;
|
|
6122
6122
|
setDirty(): void;
|
|
6123
|
+
private buildPrimaryKey;
|
|
6123
6124
|
private buildTableOptions;
|
|
6124
6125
|
parseType(reg: IRegistry): AbstractType;
|
|
6125
6126
|
private parseXML;
|
|
@@ -13,7 +13,7 @@ class Assign {
|
|
|
13
13
|
const theSource = sources[sources.length - 1];
|
|
14
14
|
let sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
|
|
15
15
|
if (sourceType === undefined || ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic))) {
|
|
16
|
-
sourceType = new basic_1.
|
|
16
|
+
sourceType = new basic_1.AnyType();
|
|
17
17
|
}
|
|
18
18
|
for (const d of ((_c = node.findDirectExpression(Expressions.AssignSource)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.Dynamic)) || []) {
|
|
19
19
|
new dynamic_1.Dynamic().runSyntax(d, scope, filename);
|
|
@@ -29,46 +29,45 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
29
29
|
this.parsedXML = undefined;
|
|
30
30
|
super.setDirty();
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
var _a, _b, _c, _d, _e
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
buildPrimaryKey() {
|
|
33
|
+
var _a, _b, _c, _d, _e;
|
|
34
|
+
const primaryKey = {
|
|
35
|
+
isUnique: ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.keykind) === "U",
|
|
36
|
+
type: basic_1.TableAccessType.standard,
|
|
37
|
+
keyFields: [],
|
|
38
|
+
name: "primary_key",
|
|
39
|
+
};
|
|
40
|
+
if (((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.accessmode) === "S") {
|
|
41
|
+
primaryKey.type = basic_1.TableAccessType.sorted;
|
|
42
42
|
}
|
|
43
43
|
else if (((_c = this.parsedXML) === null || _c === void 0 ? void 0 : _c.accessmode) === "H") {
|
|
44
|
-
primaryKey =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
keyFields: [],
|
|
48
|
-
name: "primary_key",
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
for (const f of ((_e = this.parsedXML) === null || _e === void 0 ? void 0 : _e.dd42v) || []) {
|
|
44
|
+
primaryKey.type = basic_1.TableAccessType.hashed;
|
|
45
|
+
}
|
|
46
|
+
for (const f of ((_d = this.parsedXML) === null || _d === void 0 ? void 0 : _d.dd42v) || []) {
|
|
52
47
|
if (f.keyname === "") {
|
|
53
|
-
primaryKey
|
|
48
|
+
primaryKey.keyFields.push(f.keyfield);
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
|
-
if (((
|
|
57
|
-
primaryKey
|
|
51
|
+
if (((_e = this.parsedXML) === null || _e === void 0 ? void 0 : _e.keydef) === "T" && primaryKey.keyFields.length === 0) {
|
|
52
|
+
primaryKey.keyFields.push("table_line");
|
|
58
53
|
}
|
|
54
|
+
return primaryKey;
|
|
55
|
+
}
|
|
56
|
+
buildTableOptions() {
|
|
57
|
+
var _a, _b, _c, _d;
|
|
59
58
|
let keyType = Types.TableKeyType.user;
|
|
60
|
-
if (((
|
|
59
|
+
if (((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.keydef) === "D") {
|
|
61
60
|
keyType = Types.TableKeyType.default;
|
|
62
61
|
}
|
|
63
62
|
const tableOptions = {
|
|
64
63
|
withHeader: false,
|
|
65
64
|
keyType: keyType,
|
|
66
|
-
primaryKey:
|
|
65
|
+
primaryKey: this.buildPrimaryKey(),
|
|
67
66
|
secondary: [],
|
|
68
67
|
};
|
|
69
|
-
for (const k of ((
|
|
68
|
+
for (const k of ((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.dd43v) || []) {
|
|
70
69
|
const fields = [];
|
|
71
|
-
for (const f of ((
|
|
70
|
+
for (const f of ((_c = this.parsedXML) === null || _c === void 0 ? void 0 : _c.dd42v) || []) {
|
|
72
71
|
if (f.keyname === k.keyname) {
|
|
73
72
|
fields.push(f.keyfield);
|
|
74
73
|
}
|
|
@@ -84,7 +83,7 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
84
83
|
default:
|
|
85
84
|
break;
|
|
86
85
|
}
|
|
87
|
-
(
|
|
86
|
+
(_d = tableOptions.secondary) === null || _d === void 0 ? void 0 : _d.push({
|
|
88
87
|
name: k.keyname,
|
|
89
88
|
type: accessType,
|
|
90
89
|
keyFields: fields,
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.7",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.36.3",
|
|
54
54
|
"@types/chai": "^4.3.5",
|
|
55
55
|
"@types/mocha": "^10.0.1",
|
|
56
|
-
"@types/node": "^20.4.
|
|
56
|
+
"@types/node": "^20.4.5",
|
|
57
57
|
"chai": "^4.3.7",
|
|
58
58
|
"eslint": "^8.45.0",
|
|
59
59
|
"mocha": "^10.2.0",
|
|
60
|
-
"c8": "^8.0.
|
|
60
|
+
"c8": "^8.0.1",
|
|
61
61
|
"source-map-support": "^0.5.21",
|
|
62
62
|
"ts-json-schema-generator": "^1.2.0",
|
|
63
63
|
"typescript": "^5.1.6"
|