@abaplint/core 2.113.176 → 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.
package/build/abaplint.d.ts
CHANGED
|
@@ -6040,7 +6040,7 @@ export declare class SkipLogic {
|
|
|
6040
6040
|
private isGeneratedBOPFInterface;
|
|
6041
6041
|
private isGeneratedProxyInterface;
|
|
6042
6042
|
private isGeneratedProxyClass;
|
|
6043
|
-
|
|
6043
|
+
isGeneratedFunctionGroup(group: FunctionGroup): boolean;
|
|
6044
6044
|
private isGeneratedGatewayClass;
|
|
6045
6045
|
private isGeneratedPersistentClass;
|
|
6046
6046
|
}
|
|
@@ -137,7 +137,7 @@ class Select {
|
|
|
137
137
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
static handleInto(node, input, fields, dbSources,
|
|
140
|
+
static handleInto(node, input, fields, dbSources, _isSingle) {
|
|
141
141
|
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
142
142
|
if (intoTable) {
|
|
143
143
|
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
@@ -148,8 +148,8 @@ class Select {
|
|
|
148
148
|
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
149
149
|
if (intoStructure) {
|
|
150
150
|
const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
|
|
151
|
-
if (inlineList.length === 1
|
|
152
|
-
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.
|
|
151
|
+
if (inlineList.length === 1) {
|
|
152
|
+
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildStructureType(fields, dbSources, input.scope));
|
|
153
153
|
}
|
|
154
154
|
else {
|
|
155
155
|
for (const inline of inlineList) {
|
|
@@ -227,6 +227,36 @@ class Select {
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
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
|
+
}
|
|
230
260
|
static buildTableType(fields, dbSources, scope) {
|
|
231
261
|
if (dbSources.length !== 1) {
|
|
232
262
|
return basic_1.VoidType.get("SELECT_todo3");
|
package/build/src/registry.js
CHANGED