pub enum CheckExpr {
Show 14 variants
True,
Col(u16),
Lit(Value),
IsNull(u16),
IsNotNull(u16),
Eq(Box<CheckExpr>, Box<CheckExpr>),
Ne(Box<CheckExpr>, Box<CheckExpr>),
Lt(Box<CheckExpr>, Box<CheckExpr>),
Le(Box<CheckExpr>, Box<CheckExpr>),
Gt(Box<CheckExpr>, Box<CheckExpr>),
Ge(Box<CheckExpr>, Box<CheckExpr>),
And(Box<CheckExpr>, Box<CheckExpr>),
Or(Box<CheckExpr>, Box<CheckExpr>),
Not(Box<CheckExpr>),
}Expand description
A minimal boolean expression IR for CHECK constraints, evaluated against a
row’s cells. Terms (CheckExpr::Col / CheckExpr::Lit) resolve to
Value; comparisons and logical ops are boolean. Any comparison involving
Value::Null yields three-valued Unknown.
Variants§
True
Constant true (the trivially-satisfied CHECK).
Col(u16)
A bare column reference used as a boolean (truthiness coercion).
Lit(Value)
A literal value.
IsNull(u16)
IsNotNull(u16)
Eq(Box<CheckExpr>, Box<CheckExpr>)
Ne(Box<CheckExpr>, Box<CheckExpr>)
Lt(Box<CheckExpr>, Box<CheckExpr>)
Le(Box<CheckExpr>, Box<CheckExpr>)
Gt(Box<CheckExpr>, Box<CheckExpr>)
Ge(Box<CheckExpr>, Box<CheckExpr>)
And(Box<CheckExpr>, Box<CheckExpr>)
Or(Box<CheckExpr>, Box<CheckExpr>)
Not(Box<CheckExpr>)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CheckExpr
impl<'de> Deserialize<'de> for CheckExpr
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for CheckExpr
Auto Trait Implementations§
impl Freeze for CheckExpr
impl RefUnwindSafe for CheckExpr
impl Send for CheckExpr
impl Sync for CheckExpr
impl Unpin for CheckExpr
impl UnsafeUnpin for CheckExpr
impl UnwindSafe for CheckExpr
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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