#[non_exhaustive]pub enum WhereOperator {
Show 65 variants
Eq,
Neq,
Gt,
Gte,
Lt,
Lte,
In,
Nin,
Contains,
Icontains,
Startswith,
Istartswith,
Endswith,
Iendswith,
Like,
Ilike,
Nlike,
Nilike,
Regex,
Iregex,
Nregex,
Niregex,
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 standard operators are supported.
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).
This enum is marked #[non_exhaustive] so that new operators (e.g., Between,
Similar) can be added in future minor versions without breaking downstream
exhaustive match expressions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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).
Nlike
Negated pattern matching (NOT LIKE).
Nilike
Negated pattern matching (case-insensitive) (NOT ILIKE).
Regex
POSIX regex match (~).
Iregex
POSIX regex match (case-insensitive) (~*).
Nregex
Negated POSIX regex match (!~).
Niregex
Negated POSIX regex match (case-insensitive) (!~*).
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 moreSource§impl Debug for WhereOperator
impl Debug for WhereOperator
Source§impl<'de> Deserialize<'de> for WhereOperator
impl<'de> Deserialize<'de> for WhereOperator
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for WhereOperator
impl PartialEq for WhereOperator
Source§impl Serialize for WhereOperator
impl Serialize for WhereOperator
impl StructuralPartialEq for WhereOperator
Auto Trait Implementations§
impl Freeze for WhereOperator
impl RefUnwindSafe for WhereOperator
impl Send for WhereOperator
impl Sync for WhereOperator
impl Unpin for WhereOperator
impl UnsafeUnpin for WhereOperator
impl UnwindSafe for WhereOperator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more