Skip to main content

Delete

Struct Delete 

Source
pub struct Delete<D, T: Table> { /* private fields */ }

Implementations§

Source§

impl<D, T: Table> Delete<D, T>

Source

pub fn correlated<S, InnerSel>( &self, source: S, selection: InnerSel, ) -> Select<D, Cons<TableSlot<S::Table, NotNull>, WrittenTable<T>>, InnerSel, WrittenTable<T>>
where S: JoinSource<D>,

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.

Source

pub fn filter<C: Condition<D, WrittenTable<T>, Idxs>, Idxs>( self, cond: C, ) -> Self

Source

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.

Trait Implementations§

Source§

impl<D: Dialect, T: Table> Statement for Delete<D, T>

Source§

type Dialect = D

Source§

type Table = T

Source§

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>,

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 Delete<D, T>
where PhantomData<fn() -> (D, T)>: Freeze,

§

impl<D, T> RefUnwindSafe for Delete<D, T>

§

impl<D, T> Send for Delete<D, T>
where PhantomData<fn() -> (D, T)>: Send,

§

impl<D, T> Sync for Delete<D, T>
where PhantomData<fn() -> (D, T)>: Sync,

§

impl<D, T> Unpin for Delete<D, T>
where PhantomData<fn() -> (D, T)>: Unpin,

§

impl<D, T> UnsafeUnpin for Delete<D, T>

§

impl<D, T> UnwindSafe for Delete<D, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<S> Superset<Nil, Nil> for S

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WrapNullable<NotNull> for T