@sap/cds-compiler 6.3.4 → 6.3.6
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/CHANGELOG.md +6 -0
- package/lib/model/csnUtils.js +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ Note: `beta` fixes, changes and features are usually not listed in this ChangeLo
|
|
|
8
8
|
but in [doc/CHANGELOG_BETA.md](doc/CHANGELOG_BETA.md).
|
|
9
9
|
The compiler behavior concerning `beta` features can change at any time without notice.
|
|
10
10
|
|
|
11
|
+
## Version 6.3.6 - 2025-09-19
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- to.sql: Topological ordering of views did not always account for subqueries (fixes regression from v5.9.0)
|
|
16
|
+
|
|
11
17
|
## Version 6.3.4 - 2025-09-11
|
|
12
18
|
|
|
13
19
|
### Fixed
|
package/lib/model/csnUtils.js
CHANGED
|
@@ -668,8 +668,7 @@ function forAllQueries( query, queryCallback, path ) {
|
|
|
668
668
|
const expr = query[prop];
|
|
669
669
|
if (expr && typeof expr === 'object') {
|
|
670
670
|
if (Array.isArray(expr)) {
|
|
671
|
-
|
|
672
|
-
forAllQueries(expr[i], queryCallback, [ ...path, prop, i ]);
|
|
671
|
+
traverseStructurizedExpression(expr, [ ...path, prop ]);
|
|
673
672
|
}
|
|
674
673
|
else {
|
|
675
674
|
for (const argName of Object.keys( expr ))
|
|
@@ -677,6 +676,23 @@ function forAllQueries( query, queryCallback, path ) {
|
|
|
677
676
|
}
|
|
678
677
|
}
|
|
679
678
|
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Traverse the possibly structured xpr. A structured expression may contain arrays inside arrays
|
|
682
|
+
* to show precedence of operators.
|
|
683
|
+
*
|
|
684
|
+
* @param {any} xpr
|
|
685
|
+
* @param {CSN.Path} csnPath
|
|
686
|
+
*/
|
|
687
|
+
function traverseStructurizedExpression( xpr, csnPath ) {
|
|
688
|
+
if (Array.isArray(xpr)) {
|
|
689
|
+
for (let i = 0; i < xpr.length; i++)
|
|
690
|
+
traverseStructurizedExpression(xpr[i], [ ...csnPath, i ]);
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
forAllQueries(xpr, queryCallback, csnPath);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
680
696
|
}
|
|
681
697
|
|
|
682
698
|
/**
|