The following table lists the available operators and their semantics:
Operator (equivalent) |
Semantics |
=, != (<>) |
Exact match, not equal (deprecated notation of not equal). |
in, not in |
Checks whether the value is one of the values named in a list in the right operand, given as a Python list: [('uid', 'in', [1, 2, 3])]. |
<, <= |
Greater than, greater or equal. |
>, >= |
Less than, less, or equal. |
like, not like |
Checks whether the right operand is contained (substring) in the value. |
ilike, not ilike |
The same as the preceding one, but case insensitive. |
=like, =ilike |
You can search for patterns here: % matches any string and _ matches one character. This is the equivalent of PostgreSQL's like. |
child_of |
For models with a parent_id field, this searches for children of the right operand, with the right operand included in the results. |
=? |
Evaluates to true if the right operand is false; otherwise, it behaves like "="; this is useful when you generate domains programmatically and want to filter for some value if it is set, but ignore it otherwise. |