Evaluates to true if the stored value exactly matches/doesn't match the provided argument. These operators are null-safe, see Null Values.
op:eq|not_eqpathString: The field name or the pathargString | Number | Boolean | null: The value to compare the stored data against
{
"op": "eq",
"path": "assettype_id",
"arg": "062e602a-3c38-46a3-b463-237e3767a5aa"
}Evaluates to true if the stored value is greater than (gt)/greater than or equal (ge)/less than (lt)/less than or
equal (le) the provided argument. These operators are not null-safe, see Null Values.
The comparator uses the database's comparators <, <=, > & >=.
If path points to a model field with of either :utc_datetime or :utc_datetime_usec, PredicateConverter annotates
the arg to increase the compatibility of user-provided values.
op:gt|ge|lt|lepathString: The field name or the pathargNumber: The value to compare the stored value against
{
"op": "ge",
"path": "currstate.temp.val",
"arg": 23
}Evaluates to true if the stored string contains (like)/contains ignoring casing (ilike)/starts with
(starts_with)/ends with ends_with the provided argument. These operators are not null-safe, see Null
Values.
op:like|ilike|starts_with|ends_withpathString: The field name or the pathargString: The value to process the operation against the stored value. Placeholder characters (%and_) are escaped.
{
"op": "ilike",
"path": "assettype.name",
"arg": "PartOfTypeName"
}Evaluates to true if the stored value is included in (in)/is not included in (not_in) the list of provided
arguments. These operators are null-safe, see Null Values.
op:in|not_inpathString: The field name or the patharg(String | Number | Boolean | null)[]: The list of values to test against the stored value. Non-list arg values are wrapped automatically.
{
"op": "in",
"path": "type_id",
"arg": [
"062e602a-3c38-46a3-b463-237e3767a5aa",
"4fe40528-aeba-48b3-b1e0-9eebed63f1a0"
]
}Deprecation: Using contains with string values is deprecated, use like instead.
Compare operation to check if a stored value or a list of values contains a single or a list of values. In case of a simple stored value it'll fallback to a basic string comparator. If the stored value is a json the postgres containment operators are applied.
Params:
op:containspathString: The field name or the pathargString | String[]: The list of values to test against the stored value.
Example:
{
"op": "contains",
"path": "meta.tags",
"arg": ["facility_a", "in_transit"]
}Evaluates to true when all (and)/any (or) sub-predicates are true.
When given an empty list for args, and evaluates to true, while or evaluates to false.
op:and|orargsPredicate[]: The list of predicates to combine
{
"op": "or",
"args": [
{
"op": "eq",
"path": "type_id",
"arg": "062e602a-3c38-46a3-b463-237e3767a5aa"
},
{
"op": "ilike",
"path": "assettype.name",
"arg": "PartOfTypeName"
}
]
}Evaluates to true when the sub-predicate is false. For operators that define an inverse operation (e.g. eq & not_eq,
in & not_in), prefer using those to avoid unexpected results if null values are involved, see Null
Values.
op:notargPredicate: A sub-predicate to invert
{
"op": "not",
"arg": {
"op": "eq",
"path": "type_id",
"arg": "062e602a-3c38-46a3-b463-237e3767a5aa"
}
}Evaluates to true if the sub-predicate is true for any of the associated entities. The any operator is also implicitly
introduced when walking a 1-to-many association using .-path notation, see Path
Resolution.
The sub-predicate is evaluated within the scope of the target entity, meaning that a path of "" targets the
relationship destination itself, and "id" targets the id column of the related entity.
op:anypathString: The field name holding the associated dataargPredicate: A sub-predicate to process against the associated data
{
"op": "any",
"path": "uploads",
"arg": {
"op": "eq",
"path": "id",
"arg": "062e602a-3c38-46a3-b463-237e3767a5aa"
}
}One-dimensional, native SQL arrays can be referenced by including an empty path in the sub-predicate.
The following example will search for an "blue" value inside the "colors" array:
{
"op": "any",
"path": "colors",
"arg": {
"op": "eq",
"path": "",
"arg": "blue"
}
}These special predicates always evaluate to true or false.
arg:true|false
{
"arg": true
}