pub struct Update<D, T: Table> { /* private fields */ }Implementations§
Source§impl<D, T: Table> Update<D, T>
impl<D, T: Table> Update<D, T>
A correlated subquery over the table this statement writes — the
same EXISTS a SELECT builds with Select::correlated, against
the one-table scope a write statement has.
pub fn filter<C: Condition<D, WrittenTable<T>, Idxs>, Idxs>( self, cond: C, ) -> Self
Sourcepub fn filter_all(
self,
conds: impl IntoIterator<Item = Predicate<D, WrittenTable<T>>>,
) -> Self
pub fn filter_all( self, conds: impl IntoIterator<Item = Predicate<D, WrittenTable<T>>>, ) -> Self
AND-folds a runtime-length collection of discharged conditions, the
same way Select::filter_all does — a PATCH narrows its rows by
however many criteria the request carried.
Trait Implementations§
Source§impl<D: Dialect, T: Table> Statement for Update<D, T>
impl<D: Dialect, T: Table> Statement for Update<D, T>
type Dialect = D
type Table = T
Source§fn to_sql(&self, _dialect: Self::Dialect) -> (String, Vec<Value>)
fn to_sql(&self, _dialect: Self::Dialect) -> (String, Vec<Value>)
The dialect is an argument for the reason
Select::to_sql’s is.Source§fn returning<Sel, Idx>(self, sel: Sel) -> Returning<Self, Sel>where
Self: Sized,
Self::Dialect: SupportsReturning,
Sel: Selection<WrittenTable<Self::Table>, Idx>,
fn returning<Sel, Idx>(self, sel: Sel) -> Returning<Self, Sel>where
Self: Sized,
Self::Dialect: SupportsReturning,
Sel: Selection<WrittenTable<Self::Table>, Idx>,
RETURNING, on whichever of the three this is — the clause is the
same clause. A distinct type rather than Self with a flag set: the
execution layer needs Sel’s concrete type to know what to decode a
returned row into, and an optional field would erase it.Auto Trait Implementations§
impl<D, T> Freeze for Update<D, T>
impl<D, T> RefUnwindSafe for Update<D, T>
impl<D, T> Send for Update<D, T>
impl<D, T> Sync for Update<D, T>
impl<D, T> Unpin for Update<D, T>
impl<D, T> UnsafeUnpin for Update<D, T>
impl<D, T> UnwindSafe for Update<D, T>
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