Skip to main content

ModelDelete

Struct ModelDelete 

Source
pub struct ModelDelete<M: Table> { /* private fields */ }
Expand description

A pending model DELETE.

Implementations§

Source§

impl<M: Table> ModelDelete<M>

Source

pub fn apply(&mut self, mods: impl Mod<M::Delete>)

Apply mods written against the concrete dialect statement.

Source

pub async fn exec(self, db: &dyn Executor) -> Result<ExecResult, ExecError>

Delete for the side effect; answers how many rows went.

Source

pub async fn all(self, db: &dyn Executor) -> Result<Vec<M::Row>, ExecError>

Delete and decode the statement’s RETURNING, if a mod put one on.

Trait Implementations§

Source§

impl<M: Table> Debug for ModelDelete<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: Table> HasJoins for ModelDelete<M>
where M::Delete: HasJoins,

Source§

fn joins_mut(&mut self) -> &mut Vec<Join>

The join list to modify.
Source§

impl<M: Table> HasLimit for ModelDelete<M>
where M::Delete: HasLimit,

Source§

fn limit_mut(&mut self) -> &mut Limit

The LIMIT clause to modify.
Source§

impl<M: Table> HasOrderBy for ModelDelete<M>
where M::Delete: HasOrderBy,

Source§

fn order_by_mut(&mut self) -> &mut OrderBy

The ORDER BY clause to modify.
Source§

impl<M: Table> HasReturning for ModelDelete<M>
where M::Delete: HasReturning,

Source§

fn returning_mut(&mut self) -> &mut Returning

The RETURNING clause to modify.
Source§

impl<M: Table> HasTableRef for ModelDelete<M>
where M::Delete: HasTableRef,

Source§

fn table_ref_mut(&mut self) -> &mut TableRef

The table reference to modify.
Source§

impl<M: Table> HasWhere for ModelDelete<M>
where M::Delete: HasWhere,

Source§

fn where_mut(&mut self) -> &mut Where

The WHERE clause to modify.
Source§

impl<M: Table> HasWith for ModelDelete<M>
where M::Delete: HasWith,

Source§

fn with_mut(&mut self) -> &mut With

The WITH clause to modify.

Auto Trait Implementations§

§

impl<M> Freeze for ModelDelete<M>
where <M as Table>::Delete: Freeze,

§

impl<M> RefUnwindSafe for ModelDelete<M>
where <M as Table>::Delete: RefUnwindSafe,

§

impl<M> Send for ModelDelete<M>

§

impl<M> Sync for ModelDelete<M>

§

impl<M> Unpin for ModelDelete<M>
where <M as Table>::Delete: Unpin,

§

impl<M> UnsafeUnpin for ModelDelete<M>
where <M as Table>::Delete: UnsafeUnpin,

§

impl<M> UnwindSafe for ModelDelete<M>
where <M as Table>::Delete: UnwindSafe,

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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.