@abaplint/core 2.119.65 → 2.119.66
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.
|
@@ -323,7 +323,8 @@ class TypeUtils {
|
|
|
323
323
|
console.dir(target);
|
|
324
324
|
console.dir(calculated);
|
|
325
325
|
*/
|
|
326
|
-
if (calculated && source instanceof basic_1.StringType
|
|
326
|
+
if (calculated && source instanceof basic_1.StringType
|
|
327
|
+
&& (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
|
|
327
328
|
return false;
|
|
328
329
|
}
|
|
329
330
|
if (calculated) {
|
|
@@ -45,6 +45,11 @@ class Concatenate {
|
|
|
45
45
|
runSyntax(node, input) {
|
|
46
46
|
const byteMode = node.findDirectTokenByText("BYTE") !== undefined;
|
|
47
47
|
const linesMode = node.findDirectTokenByText("LINES") !== undefined;
|
|
48
|
+
if (node.findFirstExpression(Expressions.TableExpression) !== undefined) {
|
|
49
|
+
const message = "CONCATENATE with table expression not possible";
|
|
50
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
48
53
|
const target = node.findFirstExpression(Expressions.Target);
|
|
49
54
|
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
50
55
|
if (inline) {
|
package/build/src/registry.js
CHANGED
|
@@ -331,6 +331,18 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
+
// INTO after WHERE parses as a valid SELECT in the low version, but is only allowed in
|
|
335
|
+
// strict SQL syntax, so move it also when the statement is no longer Unknown
|
|
336
|
+
if (ret.length === 0) {
|
|
337
|
+
for (let i = 0; i < lowStatements.length; i++) {
|
|
338
|
+
const low = lowStatements[i];
|
|
339
|
+
const high = highStatements[i];
|
|
340
|
+
const issue = this.downportSQLMoveInto(low, high, lowFile, highSyntax);
|
|
341
|
+
if (issue) {
|
|
342
|
+
ret.push(issue);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
334
346
|
}
|
|
335
347
|
return ret;
|
|
336
348
|
}
|
|
@@ -574,10 +586,14 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
574
586
|
return undefined;
|
|
575
587
|
}
|
|
576
588
|
//////////////////////////////////////////
|
|
577
|
-
/** move INTO from after WHERE to after FROM
|
|
589
|
+
/** move INTO from after WHERE to after FROM,
|
|
590
|
+
* note that INTO after WHERE is only valid in strict SQL syntax, so it must be moved when
|
|
591
|
+
* downporting; this can happen both while the statement is still Unknown(from the main loop)
|
|
592
|
+
* and after the @ and FIELDS have been removed, leaving a SELECT that parses in the low version */
|
|
578
593
|
downportSQLMoveInto(low, high, lowFile, _highSyntax) {
|
|
579
594
|
var _a;
|
|
580
|
-
if (!(
|
|
595
|
+
if (!(high.get() instanceof Statements.Select)
|
|
596
|
+
&& !(high.get() instanceof Statements.SelectLoop)) {
|
|
581
597
|
return undefined;
|
|
582
598
|
}
|
|
583
599
|
// note: SQLCond is also used in JOIN(FROM) conditions
|
|
@@ -585,6 +601,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
585
601
|
if (where === undefined) {
|
|
586
602
|
return undefined;
|
|
587
603
|
}
|
|
604
|
+
// the FIELDS list sits between FROM and WHERE, wait for it to be removed first
|
|
588
605
|
if (high.findFirstExpression(Expressions.SQLFields) !== undefined) {
|
|
589
606
|
return undefined;
|
|
590
607
|
}
|