-
Notifications
You must be signed in to change notification settings - Fork 2
SyntaxConjunctions
Glythcing edited this page Sep 17, 2018
·
1 revision
The AND
, OR
conjunctions are used to combine multiple predicates.
- Using
AND
every predicate must match in order for the expression to be matched. - Using
OR
at least one predicate must match in order for the expression to be matched.
Given this expression:
x > 0 and (y < 2 or (z = 'foo' and p > 5)) and q = 4
An incoming structure with any of the following contents will be matched:
x = 1 and q = 4 and y = 1
x = 1 and q = 4 and z = 'foo' and p = 6
An incoming structure with any of the following contents will not be matched:
x = -1 and q = 4 and y = 1
x = 1 and q = 5 and y = 1
x = 1 and q = 4 and y = 2
x = 1 and q = 4 and z = 'bar' and p = 6
x = 1 and q = 4 and z = 'foo'