pub enum Operator {
Show 29 variants
Eq,
Ne,
Gt,
Gte,
Lt,
Lte,
Fuzzy,
In,
NotIn,
IsNull,
IsNotNull,
Contains,
KeyExists,
JsonExists,
JsonQuery,
JsonValue,
Like,
NotLike,
ILike,
NotILike,
Between,
NotBetween,
Exists,
NotExists,
Regex,
RegexI,
SimilarTo,
ContainedBy,
Overlaps,
}Variants§
Eq
Ne
Not equal (!=, <>)
Gt
Greater than (>)
Gte
Greater than or equal (>=)
Lt
Less than (<)
Lte
Less than or equal (<=)
Fuzzy
In
NotIn
IsNull
IsNotNull
Contains
KeyExists
JsonExists
JSON_EXISTS - check if path exists (Postgres 17+)
JsonQuery
JSON_QUERY - extract JSON object/array at path (Postgres 17+)
JsonValue
JSON_VALUE - extract scalar value at path (Postgres 17+)
Like
NotLike
ILike
ILIKE case-insensitive pattern match (Postgres)
NotILike
NOT ILIKE case-insensitive pattern match (Postgres)
Between
BETWEEN x AND y - range check (value stored as Value::Array with 2 elements)
NotBetween
Exists
EXISTS (subquery) - check if subquery returns any rows
NotExists
Regex
Regular expression match (~ in Postgres)
RegexI
Case-insensitive regex (~* in Postgres)
SimilarTo
ContainedBy
Overlaps
Array overlap (&&)
Implementations§
Source§impl Operator
impl Operator
Sourcepub fn sql_symbol(&self) -> &'static str
pub fn sql_symbol(&self) -> &'static str
For simple operators, returns the symbol directly. For complex operators (BETWEEN, EXISTS), returns the keyword.
Sourcepub fn needs_value(&self) -> bool
pub fn needs_value(&self) -> bool
IS NULL, IS NOT NULL, EXISTS, NOT EXISTS don’t need values.