#[non_exhaustive]pub enum BoolExpr {
Show 18 variants
#[non_exhaustive] Constant(bool),
#[non_exhaustive] Compare {
left: ValueExpr,
op: BoolOp,
right: ValueExpr,
},
#[non_exhaustive] IsNull {
expr: ValueExpr,
negated: bool,
},
#[non_exhaustive] IsBoolean {
expr: ValueExpr,
test: BooleanTest,
negated: bool,
},
#[non_exhaustive] InList {
expr: ValueExpr,
values: Vec<ValueExpr>,
negated: bool,
},
#[non_exhaustive] InSubquery {
expr: ValueExpr,
query: Box<Stmt>,
negated: bool,
},
#[non_exhaustive] Between {
expr: ValueExpr,
low: ValueExpr,
high: ValueExpr,
negated: bool,
},
#[non_exhaustive] Like {
expr: ValueExpr,
pattern: ValueExpr,
case_insensitive: bool,
negated: bool,
escape: bool,
},
#[non_exhaustive] SimilarTo {
expr: ValueExpr,
pattern: ValueExpr,
negated: bool,
},
#[non_exhaustive] Regex {
expr: ValueExpr,
pattern: ValueExpr,
case_insensitive: bool,
negated: bool,
},
#[non_exhaustive] Infix {
left: ValueExpr,
op: &'static str,
right: ValueExpr,
negated: bool,
checked: bool,
},
#[non_exhaustive] Any {
value: ValueExpr,
array: ValueExpr,
negated: bool,
},
#[non_exhaustive] ArrayIsEmpty {
expr: ValueExpr,
negated: bool,
},
#[non_exhaustive] And(Vec<BoolExpr>),
#[non_exhaustive] Or(Vec<BoolExpr>),
#[non_exhaustive] Not(Box<BoolExpr>),
#[non_exhaustive] Exists(Box<Stmt>),
#[non_exhaustive] Raw {
sql: String,
params: Vec<Param>,
},
}Expand description
Boolean expression AST.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]Constant(bool)
Boolean constant.
#[non_exhaustive]Compare
Binary comparison.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]IsNull
IS NULL / IS NOT NULL.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]IsBoolean
IS TRUE / IS NOT TRUE and related boolean tests.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
test: BooleanTestBoolean test kind.
#[non_exhaustive]InList
IN (...) / NOT IN (...).
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]InSubquery
IN (subquery) / NOT IN (subquery).
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Between
BETWEEN / NOT BETWEEN.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Like
LIKE / ILIKE predicate.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]SimilarTo
SIMILAR TO predicate.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Regex
PostgreSQL regex predicate.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Infix
Custom typed infix predicate.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Any
value = ANY(array) / negated form.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]ArrayIsEmpty
Array-empty predicate.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]And(Vec<BoolExpr>)
Logical conjunction.
#[non_exhaustive]Or(Vec<BoolExpr>)
Logical disjunction.
#[non_exhaustive]Not(Box<BoolExpr>)
Logical negation.
#[non_exhaustive]Exists(Box<Stmt>)
EXISTS (subquery).
#[non_exhaustive]Raw
Server-owned raw predicate.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BoolExpr
impl !UnwindSafe for BoolExpr
impl Freeze for BoolExpr
impl Send for BoolExpr
impl Sync for BoolExpr
impl Unpin for BoolExpr
impl UnsafeUnpin for BoolExpr
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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