Skip to content

Conversation

@patricebender
Copy link
Member

this is a preparation for #1361 and it also makes our lifes easier as the infix filter at this place is semantically equivalent to a regular where clause.

this is a preparation for #1361 and it also makes our lifes easier
as the infix filter at this place is semantically equivalent to a
regular `where` clause.
expect(query).to.deep.equal(
cds.ql`SELECT from bookshop.Books as Books {Books.ID}
WHERE (Books.price > 5) and (Books.price < 12.13)
WHERE Books.price < 12.13 and Books.price > 5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only wrap in parens if really needed

}
WHERE EXISTS (
SELECT 1 from bookshop.Books as $B where $B.author_ID = $a.ID
SELECT 1 from bookshop.Books as $B2 where $B2.author_ID = $a.ID
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alias order changes because infix filter at leaf are put at the very front of the queries where

@patricebender patricebender marked this pull request as draft October 6, 2025 14:05
Comment on lines -83 to -84
//(SMW) TODO I'd prefer to have the cond from the filter before the cond coming from the WHERE
// which, by the way, is the case in tests below where we have a path in FROM -> ???
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done according to your wish @stewsk

@patricebender patricebender marked this pull request as ready for review October 23, 2025 12:32
@patricebender patricebender enabled auto-merge (squash) October 24, 2025 06:37
@patricebender patricebender merged commit 3f64763 into main Oct 24, 2025
6 checks passed
@patricebender patricebender deleted the patrice/infix-leaf branch October 24, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants