@abaplint/core 2.115.26 → 2.115.27

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.
@@ -245,7 +245,7 @@ class Select {
245
245
  }
246
246
  }
247
247
  static buildStructureType(fields, dbSources, scope) {
248
- var _a, _b, _c;
248
+ var _a, _b, _c, _d, _e, _f;
249
249
  if (fields.length === 1 && dbSources.length === 1) {
250
250
  const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
251
251
  if (dbType === undefined) {
@@ -286,8 +286,36 @@ class Select {
286
286
  }
287
287
  }
288
288
  }
289
+ else if (dbSources.length === 1) {
290
+ const dbType = (_d = dbSources[0]) === null || _d === void 0 ? void 0 : _d.parseType(scope.getRegistry());
291
+ if (dbType === undefined) {
292
+ const name = ((_e = dbSources[0]) === null || _e === void 0 ? void 0 : _e.getName()) || "buildStructureTypeError";
293
+ if (scope.getRegistry().inErrorNamespace(name) === true) {
294
+ return new basic_1.UnknownType("Select, " + name + " not found");
295
+ }
296
+ else {
297
+ return basic_1.VoidType.get((_f = dbSources[0]) === null || _f === void 0 ? void 0 : _f.getName());
298
+ }
299
+ }
300
+ if (!(dbType instanceof basic_1.StructureType)) {
301
+ return basic_1.VoidType.get("SELECT_todo14");
302
+ }
303
+ const allFieldsSimple = fields.every(f => isSimple.test(f.code));
304
+ if (allFieldsSimple === true) {
305
+ const components = [];
306
+ for (const field of fields) {
307
+ const type = dbType.getComponentByName(field.code);
308
+ if (type === undefined) {
309
+ return basic_1.VoidType.get("SELECT_todo9");
310
+ }
311
+ components.push({ name: field.as || field.code, type });
312
+ }
313
+ return new basic_1.StructureType(components);
314
+ }
315
+ return basic_1.VoidType.get("SELECT_todo12");
316
+ }
289
317
  else {
290
- return basic_1.VoidType.get("SELECT_todo9");
318
+ return basic_1.VoidType.get("SELECT_todo13");
291
319
  }
292
320
  }
293
321
  static buildTableType(fields, dbSources, scope) {
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.115.26";
77
+ return "2.115.27";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.115.26",
3
+ "version": "2.115.27",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",