@sap/cds-compiler 5.9.10 → 5.9.12
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 +14 -0
- package/lib/model/csnUtils.js +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,18 +7,30 @@
|
|
|
7
7
|
Note: `beta` fixes, changes and features are usually not listed in this ChangeLog but [here](doc/CHANGELOG_BETA.md).
|
|
8
8
|
The compiler behavior concerning `beta` features can change at any time without notice.
|
|
9
9
|
|
|
10
|
+
## Version 5.9.12 - 2025-09-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- to.sql: Topological ordering of views did not always account for subqueries (fixes regression from v5.9.0)
|
|
15
|
+
|
|
10
16
|
## Version 5.9.10 - 2025-09-11
|
|
11
17
|
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
12
20
|
- parser: Keep parentheses around lists on the right side of an `in` operator.
|
|
13
21
|
- compiler: For calculated elements using associations with filters and cardinality, CSN recompilation could
|
|
14
22
|
fail for `gensrc` CSN, as happens for MTX.
|
|
15
23
|
|
|
16
24
|
## Version 5.9.8 - 2025-07-14
|
|
17
25
|
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
18
28
|
- compiler: Calculated elements can now have a localized type
|
|
19
29
|
|
|
20
30
|
## Version 5.9.6 - 2025-06-18
|
|
21
31
|
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
22
34
|
- to.sql: Fix error when calculated element refers to a localized element.
|
|
23
35
|
- to.edm(x):
|
|
24
36
|
+ Fix errors for service entities containing multiple path steps (e.g. `Service.Prefix.MyEntity`).
|
|
@@ -26,6 +38,8 @@ The compiler behavior concerning `beta` features can change at any time without
|
|
|
26
38
|
|
|
27
39
|
## Version 5.9.4 - 2025-05-22
|
|
28
40
|
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
29
43
|
- to.edm(x): Parameters are marked optional unless explicitly marked as `not null`.
|
|
30
44
|
Annotation `Core.OptionalParameter` will be added to optional parameters.
|
|
31
45
|
|
package/lib/model/csnUtils.js
CHANGED
|
@@ -602,8 +602,7 @@ function forAllQueries( query, queryCallback, path ) {
|
|
|
602
602
|
const expr = query[prop];
|
|
603
603
|
if (expr && typeof expr === 'object') {
|
|
604
604
|
if (Array.isArray(expr)) {
|
|
605
|
-
|
|
606
|
-
forAllQueries(expr[i], queryCallback, [ ...path, prop, i ]);
|
|
605
|
+
traverseStructurizedExpression(expr, [ ...path, prop ]);
|
|
607
606
|
}
|
|
608
607
|
else {
|
|
609
608
|
for (const argName of Object.keys( expr ))
|
|
@@ -611,6 +610,23 @@ function forAllQueries( query, queryCallback, path ) {
|
|
|
611
610
|
}
|
|
612
611
|
}
|
|
613
612
|
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Traverse the possibly structured xpr. A structured expression may contain arrays inside arrays
|
|
616
|
+
* to show precedence of operators.
|
|
617
|
+
*
|
|
618
|
+
* @param {any} xpr
|
|
619
|
+
* @param {CSN.Path} csnPath
|
|
620
|
+
*/
|
|
621
|
+
function traverseStructurizedExpression( xpr, csnPath ) {
|
|
622
|
+
if (Array.isArray(xpr)) {
|
|
623
|
+
for (let i = 0; i < xpr.length; i++)
|
|
624
|
+
traverseStructurizedExpression(xpr[i], [ ...csnPath, i ]);
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
forAllQueries(xpr, queryCallback, csnPath);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
614
630
|
}
|
|
615
631
|
|
|
616
632
|
/**
|