@abaplint/core 2.83.11 → 2.83.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.
@@ -1242,6 +1242,7 @@ declare class DataDefinition extends AbstractObject {
1242
1242
  allowNamespace: boolean;
1243
1243
  };
1244
1244
  getSQLViewName(): string | undefined;
1245
+ getDefinitionName(): string | undefined;
1245
1246
  getDescription(): string | undefined;
1246
1247
  parseType(reg: IRegistry): AbstractType;
1247
1248
  getParsedData(): ParsedDataDefinition | undefined;
@@ -4079,6 +4080,7 @@ declare class ParenRightW extends Token {
4079
4080
 
4080
4081
  declare type ParsedDataDefinition = {
4081
4082
  sqlViewName: string | undefined;
4083
+ definitionName: string | undefined;
4082
4084
  fields: {
4083
4085
  key: boolean;
4084
4086
  name: string;
package/build/src/ddic.js CHANGED
@@ -155,10 +155,6 @@ class DDIC {
155
155
  if (foundTTYP) {
156
156
  return { type: foundTTYP.parseType(this.reg), object: foundTTYP };
157
157
  }
158
- const foundDDLS = this.reg.getObject("DDLS", name);
159
- if (foundDDLS) {
160
- return { type: foundDDLS.parseType(this.reg), object: foundDDLS };
161
- }
162
158
  const foundDTEL = this.reg.getObject("DTEL", name);
163
159
  if (foundDTEL) {
164
160
  return { type: foundDTEL.parseType(this.reg), object: foundDTEL };
@@ -166,7 +162,7 @@ class DDIC {
166
162
  const upper = name.toUpperCase();
167
163
  for (const obj of this.reg.getObjectsByType("DDLS")) {
168
164
  const ddls = obj;
169
- if (ddls.getSQLViewName() === upper) {
165
+ if (ddls.getSQLViewName() === upper || ddls.getDefinitionName() === upper) {
170
166
  return { type: ddls.parseType(this.reg), object: obj };
171
167
  }
172
168
  }
@@ -220,14 +216,10 @@ class DDIC {
220
216
  if (foundTABL) {
221
217
  return { type: foundTABL.parseType(this.reg), object: foundTABL };
222
218
  }
223
- const foundDDLS = this.reg.getObject("DDLS", name);
224
- if (foundDDLS) {
225
- return { type: foundDDLS.parseType(this.reg), object: foundDDLS };
226
- }
227
219
  const upper = name.toUpperCase();
228
220
  for (const obj of this.reg.getObjectsByType("DDLS")) {
229
221
  const ddls = obj;
230
- if (ddls.getSQLViewName() === upper) {
222
+ if (ddls.getSQLViewName() === upper || ddls.getDefinitionName() === upper) {
231
223
  return { type: ddls.parseType(this.reg), object: ddls };
232
224
  }
233
225
  }
@@ -245,14 +237,10 @@ class DDIC {
245
237
  if (foundVIEW) {
246
238
  return foundVIEW;
247
239
  }
248
- const foundDDLS = this.reg.getObject("DDLS", name);
249
- if (foundDDLS) {
250
- return foundDDLS;
251
- }
252
240
  const upper = name.toUpperCase();
253
241
  for (const obj of this.reg.getObjectsByType("DDLS")) {
254
242
  const ddls = obj;
255
- if (ddls.getSQLViewName() === upper) {
243
+ if (ddls.getSQLViewName() === upper || ddls.getDefinitionName() === upper) {
256
244
  return ddls;
257
245
  }
258
246
  }
@@ -25,6 +25,11 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
25
25
  this.parse();
26
26
  return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.sqlViewName;
27
27
  }
28
+ getDefinitionName() {
29
+ var _a;
30
+ this.parse();
31
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.definitionName;
32
+ }
28
33
  getDescription() {
29
34
  // todo
30
35
  return undefined;
@@ -53,12 +58,14 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
53
58
  return this.parserError;
54
59
  }
55
60
  parse() {
61
+ var _a, _b;
56
62
  if (this.isDirty() === false) {
57
63
  return { updated: false, runtime: 0 };
58
64
  }
59
65
  const start = Date.now();
60
66
  this.parsedData = {
61
67
  sqlViewName: undefined,
68
+ definitionName: undefined,
62
69
  fields: [],
63
70
  sources: [],
64
71
  relations: [],
@@ -68,6 +75,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
68
75
  this.findSQLViewName();
69
76
  this.parsedData.tree = new cds_parser_1.CDSParser().parse(this.findSourceFile());
70
77
  if (this.parsedData.tree) {
78
+ this.parsedData.definitionName = (_b = (_a = this.parsedData.tree) === null || _a === void 0 ? void 0 : _a.findFirstExpression(expressions_1.CDSName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
71
79
  this.findSourcesAndRelations(this.parsedData.tree);
72
80
  this.findFieldNames(this.parsedData.tree);
73
81
  }
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.83.11";
71
+ return "2.83.12";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.83.11",
3
+ "version": "2.83.12",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",