Last active
March 16, 2023 23:28
-
-
Save timowest/5098112 to your computer and use it in GitHub Desktop.
Querydsl and/or examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1 | |
e1.or(e2).and(e3)) | |
creates at first an 'or' operation based on e1 and e2 and uses this 'or' operation | |
in a top level 'and' operation with e3 as the second operand. | |
Since 'and' has higher precedence than 'or' it is serialized as | |
(e1 or e2) and e3 | |
#2 | |
e1.or(e2).and(e3.or(e4))) | |
'and' is the top level operation and e1.or(e2) and e3.or(e4) are the lower level operations | |
It is serialized as | |
(e1 or e2) and (e3 or e4) | |
#3 | |
e1.and(e2).or(e3.and(a4)) | |
`or`is the top level operation and e1.and(e2) and e3.and(e4) are the lower level operations | |
It is serialized as | |
e1 and e2 or e3 and e4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@virgo47 Oh, I got it. Thanks!