Permissions Operators
Common operators (all column types except json, jsonb)
Operator | PostgreSQL equivalent | Description |
---|---|---|
_eq | = | Equal to |
_ne | <> | Not equal to |
_gt | > | Greater than |
_lt | < | Less than |
_gte | >= | Greater than or equal to |
_lte | <= | Less than or equal to |
_in | IN | In array |
_nin | NOT IN | Not in array |
_is_null | IS NULL | Is null |
Logical operators
Operator | PostgreSQL equivalent | Description |
---|---|---|
_and | AND | Logical AND |
_or | OR | Logical OR |
_not | NOT | Logical NOT |
Exists operator
Operator | PostgreSQL equivalent | Description |
---|---|---|
_exists | EXISTS | Check for existence |
String extended operators
Operator | PostgreSQL equivalent | Description |
---|---|---|
_like | LIKE | Like |
_nlike | NOT LIKE | Not like |
_ilike | ILIKE | Case insensitive like |
_nilike | NOT ILIKE | Case insensitive not like |
_similar | SIMILAR TO | Similar |
_nsimilar | NOT SIMILAR TO | Not similar |
_regex | ~ | Regular expression match |
_iregex | ~* | Case insensitive regex |
_nregex | !~ | Not regex |
_niregex | !~* | Not case insensitive regex |
Similar
The SIMILAR TO operator in SQL returns true or false depending on whether its pattern matches the given string. It is much the same as LIKE, except that it interprets the pattern using SQL99's definition of a regular expression. SQL99's regular expressions are a curious cross between LIKE notation and common regular expression notation.
Column comparison operators
Operator | Description |
---|---|
_ceq | Column equal to |
_cne | Column not equal to |
_cgt | Column greater than |
_clt | Column less than |
_cgte | Column greater than or equal to |
_clte | Column less than or equal to |
JSONB operators
Operator | PostgreSQL equivalent | Description |
---|---|---|
_is_null | IS NULL | Is null |
_contains | @> | Contains (Does the left JSON value contain within it the right value?) |
_contained_in | <@ | Contained in (Is the left JSON value contained within the right value?) |
_has_key | ? | Has key (Does the key/element string exist within the JSON value?) |
_has_keys_any | ?| | Has keys any (Do any of these key/element strings exist?) |
_has_keys_all | ?& | Has keys all (Do all of these key/element strings exist?) |