cap-js / cds-dbs

Monorepo for SQL Database Services for CAP
https://cap.cloud.sap/docs/
Apache License 2.0
37 stars 11 forks source link

feat: enable path expressions in infix filter after `exists` predicate #875

Closed patricebender closed 1 week ago

patricebender commented 4 weeks ago

if a path expression is detected in a infix filter of an association which follows an exists predicate, we add the filter expression as a whole to the exists (<subquery>) and then recursively transform it with cqn4sql to get the proper joins.

Usually, transforming the exists <subquery> is not necessary, because the where clause is already well formed -> there is a mechanism to flag a path expression in this special case as such.

this is just a simple poc… more tests need to be added.

fix: nested exists wrapped in xpr reported in cap/cdsnode/issues/2194