Enum Assignment
pub enum Assignment {
Set(Expr),
Insert(Expr),
Remove(Expr),
Batch(Vec<Assignment>),
}Expand description
A field assignment within an Update statement.
Each variant carries the expression providing the value for the operation.
Multiple operations on the same field are represented via Batch.
§Examples
ⓘ
use toasty_core::stmt::{Assignment, Expr};
let assignment = Assignment::Set(Expr::null());
assert!(assignment.is_set());Variants§
Set(Expr)
Set a field, replacing the current value.
Insert(Expr)
Insert one or more values into a set field.
Remove(Expr)
Remove one or more values from a set field.
Batch(Vec<Assignment>)
Multiple assignments on the same field.
Implementations§
§impl Assignment
impl Assignment
Trait Implementations§
§impl Clone for Assignment
impl Clone for Assignment
§fn clone(&self) -> Assignment
fn clone(&self) -> Assignment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Assignment
impl Debug for Assignment
§impl Node for Assignment
impl Node for Assignment
§impl PartialEq for Assignment
impl PartialEq for Assignment
impl StructuralPartialEq for Assignment
Auto Trait Implementations§
impl Freeze for Assignment
impl RefUnwindSafe for Assignment
impl Send for Assignment
impl Sync for Assignment
impl Unpin for Assignment
impl UnwindSafe for Assignment
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