pub struct DeleteOne<A>where
A: ActiveModelTrait,{ /* private fields */ }
Expand description
Perform a delete operation on a model
Implementations§
Source§impl<'a, A> DeleteOne<A>where
A: ActiveModelTrait + 'a,
impl<'a, A> DeleteOne<A>where
A: ActiveModelTrait + 'a,
Sourcepub fn exec<C>(
self,
db: &'a C,
) -> impl Future<Output = Result<DeleteResult, DbErr>> + '_where
C: ConnectionTrait,
pub fn exec<C>(
self,
db: &'a C,
) -> impl Future<Output = Result<DeleteResult, DbErr>> + '_where
C: ConnectionTrait,
Execute a DELETE operation on one ActiveModel
Trait Implementations§
Source§impl<A> QueryFilter for DeleteOne<A>where
A: ActiveModelTrait,
impl<A> QueryFilter for DeleteOne<A>where
A: ActiveModelTrait,
type QueryStatement = DeleteStatement
Source§fn query(&mut self) -> &mut DeleteStatement
fn query(&mut self) -> &mut DeleteStatement
Add the query to perform a FILTER on
Source§fn filter<F>(self, filter: F) -> Selfwhere
F: IntoCondition,
fn filter<F>(self, filter: F) -> Selfwhere
F: IntoCondition,
Add an AND WHERE expression Read more
Source§fn belongs_to<M>(self, model: &M) -> Selfwhere
M: ModelTrait,
fn belongs_to<M>(self, model: &M) -> Selfwhere
M: ModelTrait,
Apply a where condition using the model’s primary key
Source§fn belongs_to_tbl_alias<M>(self, model: &M, tbl_alias: &str) -> Selfwhere
M: ModelTrait,
fn belongs_to_tbl_alias<M>(self, model: &M, tbl_alias: &str) -> Selfwhere
M: ModelTrait,
Perform a check to determine table belongs to a Model through it’s name alias
Source§impl<A> QueryTrait for DeleteOne<A>where
A: ActiveModelTrait,
impl<A> QueryTrait for DeleteOne<A>where
A: ActiveModelTrait,
Source§type QueryStatement = DeleteStatement
type QueryStatement = DeleteStatement
Constrain the QueryStatement to QueryStatementBuilder trait
Source§fn query(&mut self) -> &mut DeleteStatement
fn query(&mut self) -> &mut DeleteStatement
Get a mutable ref to the query builder
Source§fn as_query(&self) -> &DeleteStatement
fn as_query(&self) -> &DeleteStatement
Get an immutable ref to the query builder
Source§fn into_query(self) -> DeleteStatement
fn into_query(self) -> DeleteStatement
Take ownership of the query builder
Auto Trait Implementations§
impl<A> Freeze for DeleteOne<A>where
A: Freeze,
impl<A> !RefUnwindSafe for DeleteOne<A>
impl<A> Send for DeleteOne<A>where
A: Send,
impl<A> Sync for DeleteOne<A>where
A: Sync,
impl<A> Unpin for DeleteOne<A>where
A: Unpin,
impl<A> !UnwindSafe for DeleteOne<A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more