Expression, Operand
Combine expressions <exp1>
and <exp2>
to get the results as in:
<exp1> | <exp2> | Result |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Syntax:
- Expression:
<exp1>
||<exp2>
- Operand: expression (true, false)
Common Usage
Example: find 10 cards or customers' information
find().nodes({@card || @customer}) as n
limit 10
return n{*}
Example: Find 10 cards at level greater than 5 or balance beyond 500,000
find().nodes({@card.balance > 500000 || @card.level > 5}) as n
limit 10
return n{*}
Note: the filter can be put into {@card && (balance > 500000 || level > 5)}
, where ||
has lower precedence than &&
, but the parenthesis ( )
can raise its priority.