@abaplint/core 2.113.175 → 2.113.177

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.
@@ -6040,7 +6040,7 @@ export declare class SkipLogic {
6040
6040
  private isGeneratedBOPFInterface;
6041
6041
  private isGeneratedProxyInterface;
6042
6042
  private isGeneratedProxyClass;
6043
- private isGeneratedFunctionGroup;
6043
+ isGeneratedFunctionGroup(group: FunctionGroup): boolean;
6044
6044
  private isGeneratedGatewayClass;
6045
6045
  private isGeneratedPersistentClass;
6046
6046
  }
@@ -34,7 +34,8 @@ class Select {
34
34
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
35
35
  return;
36
36
  }
37
- const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE";
37
+ const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE"
38
+ || node.get() instanceof Expressions.SelectLoop;
38
39
  this.checkFields(fields, dbSources, input, node);
39
40
  this.handleInto(node, input, fields, dbSources, isSingle);
40
41
  const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
@@ -136,7 +137,7 @@ class Select {
136
137
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
137
138
  }
138
139
  }
139
- static handleInto(node, input, fields, dbSources, isSingle) {
140
+ static handleInto(node, input, fields, dbSources, _isSingle) {
140
141
  const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
141
142
  if (intoTable) {
142
143
  const inline = intoTable.findFirstExpression(Expressions.InlineData);
@@ -147,8 +148,8 @@ class Select {
147
148
  const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
148
149
  if (intoStructure) {
149
150
  const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
150
- if (inlineList.length === 1 && fields.length === 1 && dbSources.length === 1 && isSingle === false) {
151
- inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildTableType(fields, dbSources, input.scope));
151
+ if (inlineList.length === 1) {
152
+ inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildStructureType(fields, dbSources, input.scope));
152
153
  }
153
154
  else {
154
155
  for (const inline of inlineList) {
@@ -226,6 +227,36 @@ class Select {
226
227
  }
227
228
  }
228
229
  }
230
+ static buildStructureType(fields, dbSources, scope) {
231
+ var _a;
232
+ if (fields.length === 1 && dbSources.length === 1) {
233
+ const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
234
+ if (dbType === undefined) {
235
+ return basic_1.VoidType.get("SELECT_todo8");
236
+ }
237
+ if (fields[0].code === "*") {
238
+ return dbType;
239
+ }
240
+ else {
241
+ if (dbType instanceof basic_1.StructureType) {
242
+ const field = dbType.getComponentByName(fields[0].code);
243
+ if (field) {
244
+ return field;
245
+ }
246
+ else {
247
+ // todo: aggregated/calculated values
248
+ return basic_1.VoidType.get("SELECT_todo11");
249
+ }
250
+ }
251
+ else {
252
+ return basic_1.VoidType.get("SELECT_todo10");
253
+ }
254
+ }
255
+ }
256
+ else {
257
+ return basic_1.VoidType.get("SELECT_todo9");
258
+ }
259
+ }
229
260
  static buildTableType(fields, dbSources, scope) {
230
261
  if (dbSources.length !== 1) {
231
262
  return basic_1.VoidType.get("SELECT_todo3");
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.175";
70
+ return "2.113.177";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.175",
3
+ "version": "2.113.177",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,7 +53,7 @@
53
53
  "@microsoft/api-extractor": "^7.52.10",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.2.1",
56
+ "@types/node": "^24.3.0",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.33.0",
59
59
  "mocha": "^11.7.1",