pub enum WhereOperator {
Show 59 variants
Eq,
Neq,
Gt,
Gte,
Lt,
Lte,
In,
Nin,
Contains,
Icontains,
Startswith,
Istartswith,
Endswith,
Iendswith,
Like,
Ilike,
IsNull,
ArrayContains,
ArrayContainedBy,
ArrayOverlaps,
LenEq,
LenGt,
LenLt,
LenGte,
LenLte,
LenNeq,
CosineDistance,
L2Distance,
L1Distance,
HammingDistance,
InnerProduct,
JaccardDistance,
Matches,
PlainQuery,
PhraseQuery,
WebsearchQuery,
IsIPv4,
IsIPv6,
IsPrivate,
IsPublic,
IsLoopback,
InSubnet,
ContainsSubnet,
ContainsIP,
Overlaps,
StrictlyContains,
AncestorOf,
DescendantOf,
MatchesLquery,
MatchesLtxtquery,
MatchesAnyLquery,
DepthEq,
DepthNeq,
DepthGt,
DepthGte,
DepthLt,
DepthLte,
Lca,
Extended(ExtendedOperator),
}Expand description
WHERE operators (FraiseQL v1 compatibility).
All operators from v1 are supported for backwards compatibility.
No underscore prefix (e.g., eq, icontains, not _eq, _icontains).
Note: ExtendedOperator variants may contain f64 values which don’t implement Eq, so WhereOperator derives PartialEq only (not Eq).
Variants§
Eq
Equal (=).
Neq
Not equal (!=).
Gt
Greater than (>).
Gte
Greater than or equal (>=).
Lt
Less than (<).
Lte
Less than or equal (<=).
In
In list (IN).
Nin
Not in list (NOT IN).
Contains
Contains substring (LIKE ‘%value%’).
Icontains
Contains substring (case-insensitive) (ILIKE ‘%value%’).
Startswith
Starts with (LIKE ‘value%’).
Istartswith
Starts with (case-insensitive) (ILIKE ‘value%’).
Endswith
Ends with (LIKE ‘%value’).
Iendswith
Ends with (case-insensitive) (ILIKE ‘%value’).
Like
Pattern matching (LIKE).
Ilike
Pattern matching (case-insensitive) (ILIKE).
IsNull
Is null (IS NULL or IS NOT NULL).
ArrayContains
Array contains (@>).
ArrayContainedBy
Array contained by (<@).
ArrayOverlaps
Array overlaps (&&).
LenEq
Array length equal.
LenGt
Array length greater than.
LenLt
Array length less than.
LenGte
Array length greater than or equal.
LenLte
Array length less than or equal.
LenNeq
Array length not equal.
CosineDistance
Cosine distance (<=>).
L2Distance
L2 (Euclidean) distance (<->).
L1Distance
L1 (Manhattan) distance (<+>).
HammingDistance
Hamming distance (<~>).
InnerProduct
Inner product (<#>). Higher values = more similar.
JaccardDistance
Jaccard distance for set similarity.
Matches
Full-text search (@@).
PlainQuery
Plain text query (plainto_tsquery).
PhraseQuery
Phrase query (phraseto_tsquery).
WebsearchQuery
Web search query (websearch_to_tsquery).
IsIPv4
Is IPv4.
IsIPv6
Is IPv6.
IsPrivate
Is private IP (RFC1918 ranges).
IsPublic
Is public IP (not private).
IsLoopback
Is loopback address (127.0.0.0/8 or ::1).
InSubnet
In subnet (<<) - IP is contained within subnet.
ContainsSubnet
Contains subnet (>>) - subnet contains another subnet.
ContainsIP
Contains IP (>>) - subnet contains an IP address.
Overlaps
Overlaps (&&) - subnets overlap.
StrictlyContains
Strictly contains (@>).
AncestorOf
Ancestor of (@>).
DescendantOf
Descendant of (<@).
MatchesLquery
Matches lquery (~).
MatchesLtxtquery
Matches ltxtquery (@) - Boolean query syntax.
MatchesAnyLquery
Matches any lquery (?).
DepthEq
Depth equal (nlevel() =).
DepthNeq
Depth not equal (nlevel() !=).
DepthGt
Depth greater than (nlevel() >).
DepthGte
Depth greater than or equal (nlevel() >=).
DepthLt
Depth less than (nlevel() <).
DepthLte
Depth less than or equal (nlevel() <=).
Lca
Lowest common ancestor (lca()).
Extended(ExtendedOperator)
Extended operator for rich scalar types (Email, VIN, CountryCode, etc.)
These operators are specialized filters enabled via feature flags.
See fraiseql_core::filters::ExtendedOperator for available operators.
Implementations§
Source§impl WhereOperator
impl WhereOperator
Sourcepub fn from_str(s: &str) -> Result<Self>
pub fn from_str(s: &str) -> Result<Self>
Parse operator from string (GraphQL input).
§Errors
Returns FraiseQLError::Validation if operator name is unknown.
Sourcepub const fn expects_array(&self) -> bool
pub const fn expects_array(&self) -> bool
Check if operator requires array value.
Sourcepub const fn is_case_insensitive(&self) -> bool
pub const fn is_case_insensitive(&self) -> bool
Check if operator is case-insensitive.
Sourcepub const fn is_string_operator(&self) -> bool
pub const fn is_string_operator(&self) -> bool
Check if operator works with strings.
Trait Implementations§
Source§impl Clone for WhereOperator
impl Clone for WhereOperator
Source§fn clone(&self) -> WhereOperator
fn clone(&self) -> WhereOperator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more