Struct Condition
pub struct Condition {
pub expr: Option<Expr>,
}Expand description
A guard condition on an Update statement.
Unlike a Filter, a condition does not select which rows
to operate on. Instead, it is evaluated after the filter and determines
whether the update should actually be applied. If the condition is not met,
the update is silently skipped.
When expr is None, no condition is applied (the update always proceeds).
§Examples
use toasty_core::stmt::Condition;
let cond = Condition::default();
assert!(cond.is_none());Fields§
§expr: Option<Expr>The condition expression, or None for unconditional updates.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
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