pub struct UpdateStatement {
pub table: String,
pub assignments: Vec<(String, Expr)>,
pub where_: Option<Expr>,
pub returning: Option<Vec<SelectItem>>,
}Expand description
UPDATE <table> SET col = expr [, ...] [WHERE cond]. v4.4 — the
engine evaluates expr per matched row in the table’s row order
and rewrites cells in place. Indexed columns are dropped + re-
inserted into the affected B-tree on each row change.
Fields§
§table: String§assignments: Vec<(String, Expr)>§where_: Option<Expr>§returning: Option<Vec<SelectItem>>v7.9.4 — RETURNING <projection>. None = no RETURNING
clause (legacy CommandComplete path). Some = engine
evaluates the projection over each mutated row and
streams the result as a Rows QueryResult.
Trait Implementations§
Source§impl Clone for UpdateStatement
impl Clone for UpdateStatement
Source§fn clone(&self) -> UpdateStatement
fn clone(&self) -> UpdateStatement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpdateStatement
impl Debug for UpdateStatement
Source§impl Display for UpdateStatement
impl Display for UpdateStatement
Source§impl PartialEq for UpdateStatement
impl PartialEq for UpdateStatement
Source§fn eq(&self, other: &UpdateStatement) -> bool
fn eq(&self, other: &UpdateStatement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UpdateStatement
Auto Trait Implementations§
impl Freeze for UpdateStatement
impl RefUnwindSafe for UpdateStatement
impl Send for UpdateStatement
impl Sync for UpdateStatement
impl Unpin for UpdateStatement
impl UnsafeUnpin for UpdateStatement
impl UnwindSafe for UpdateStatement
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