pub struct Delete<DB>where
DB: Database,{
pub table_name: TableName,
/* private fields */
}
Expand description
删除操作
Fields§
§table_name: TableName
Implementations§
Source§impl<DB> Delete<DB>where
DB: Database,
impl<DB> Delete<DB>where
DB: Database,
pub fn type_new<T1>() -> Delete<DB>where
T1: ModelTableField<DB> + ModelTableName,
pub fn new(table_name: TableName) -> Delete<DB>
pub async fn execute_by_where<'c, E>(
&self,
where_sql: &WhereOption,
executor: E,
) -> Result<<DB as Database>::QueryResult, Error>where
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
E: Executor<'c, Database = DB>,
pub async fn execute_by_pk<'c, T, E>(
&self,
source: &T,
executor: E,
) -> Result<<DB as Database>::QueryResult, Error>where
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
T: ModelTableField<DB>,
E: Executor<'c, Database = DB>,
pub async fn execute_by_scalar_pk<'c, T, PT, E>(
&self,
pk_scalar: PT,
executor: E,
) -> Result<<DB as Database>::QueryResult, Error>where
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
T: ModelTableField<DB>,
for<'q> PT: 'q + Send + Encode<'q, DB> + Type<DB>,
E: Executor<'c, Database = DB>,
Auto Trait Implementations§
impl<DB> Freeze for Delete<DB>
impl<DB> RefUnwindSafe for Delete<DB>where
DB: RefUnwindSafe,
impl<DB> Send for Delete<DB>
impl<DB> Sync for Delete<DB>where
DB: Sync,
impl<DB> Unpin for Delete<DB>where
DB: Unpin,
impl<DB> UnwindSafe for Delete<DB>where
DB: UnwindSafe,
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> 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