Now that we've seen all possible operators, we'll see that it is possible to conjoin, disjoin, or negate them. For example:
objects=ec.fetch('Writer', qualifier='lastName like "H*" AND age >= 80')
'H'
and who are older than 80.
Likewise,
objects=ec.fetch('Writer', qualifier='age<50 OR lastName like "????"')
Last, operator 'NOT'
negates the expression, so
objects=ec.fetch('Writer', qualifier='NOT(age<50 OR lastName like "????")')
'AND'
, 'OR'
, 'NOT'
, 'IN'
and 'NOT
IN'
can be written upper-case or lower-case, while operators 'like'
,
ilike
and 'caseInsensitiveLike'
should be written as-is (exact
typo.)
For example:NOT age<50 OR age>200
is in fact equivalent toNOT(age<50 OR age>200)
.
Hence, in general, you are strongly encouraged to enclose the expressions in brackets so that the precedence of operators does not intervene at all.
Comments are welcome: Sebastien Bigaret / Modeling Home Page