Struct sea_orm::query::UpdateMany
source · [−]pub struct UpdateMany<E>where
E: EntityTrait,{ /* private fields */ }
Expand description
Defines an UPDATE operation on multiple ActiveModels
Implementations
sourceimpl<'a, E> UpdateMany<E>where
E: EntityTrait,
impl<'a, E> UpdateMany<E>where
E: EntityTrait,
sourcepub fn exec<C>(
self,
db: &'a C
) -> impl Future<Output = Result<UpdateResult, DbErr>> + '_where
C: ConnectionTrait,
pub fn exec<C>(
self,
db: &'a C
) -> impl Future<Output = Result<UpdateResult, DbErr>> + '_where
C: ConnectionTrait,
Execute an update operation on multiple ActiveModels
sourceimpl<E> UpdateMany<E>where
E: EntityTrait,
impl<E> UpdateMany<E>where
E: EntityTrait,
sourcepub fn set<A>(self, model: A) -> Selfwhere
A: ActiveModelTrait<Entity = E>,
pub fn set<A>(self, model: A) -> Selfwhere
A: ActiveModelTrait<Entity = E>,
Add the models to update to Self
sourcepub fn col_expr<T>(self, col: T, expr: SimpleExpr) -> Selfwhere
T: IntoIden,
pub fn col_expr<T>(self, col: T, expr: SimpleExpr) -> Selfwhere
T: IntoIden,
Creates a SimpleExpr from a column
Trait Implementations
sourceimpl<E: Clone> Clone for UpdateMany<E>where
E: EntityTrait,
impl<E: Clone> Clone for UpdateMany<E>where
E: EntityTrait,
sourcefn clone(&self) -> UpdateMany<E>
fn clone(&self) -> UpdateMany<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<E: Debug> Debug for UpdateMany<E>where
E: EntityTrait,
impl<E: Debug> Debug for UpdateMany<E>where
E: EntityTrait,
sourceimpl<E> QueryFilter for UpdateMany<E>where
E: EntityTrait,
impl<E> QueryFilter for UpdateMany<E>where
E: EntityTrait,
type QueryStatement = UpdateStatement
sourcefn query(&mut self) -> &mut UpdateStatement
fn query(&mut self) -> &mut UpdateStatement
Add the query to perform a FILTER on
sourcefn filter<F>(self, filter: F) -> Selfwhere
F: IntoCondition,
fn filter<F>(self, filter: F) -> Selfwhere
F: IntoCondition,
Add an AND WHERE expression Read more
sourcefn 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
sourcefn 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
sourceimpl<E> QueryTrait for UpdateMany<E>where
E: EntityTrait,
impl<E> QueryTrait for UpdateMany<E>where
E: EntityTrait,
type QueryStatement = UpdateStatement
type QueryStatement = UpdateStatement
Constrain the QueryStatement to QueryStatementBuilder trait
sourcefn query(&mut self) -> &mut UpdateStatement
fn query(&mut self) -> &mut UpdateStatement
Get a mutable ref to the query builder
sourcefn as_query(&self) -> &UpdateStatement
fn as_query(&self) -> &UpdateStatement
Get an immutable ref to the query builder
sourcefn into_query(self) -> UpdateStatement
fn into_query(self) -> UpdateStatement
Take ownership of the query builder
Auto Trait Implementations
impl<E> !RefUnwindSafe for UpdateMany<E>
impl<E> Send for UpdateMany<E>
impl<E> Sync for UpdateMany<E>
impl<E> Unpin for UpdateMany<E>where
E: Unpin,
impl<E> !UnwindSafe for UpdateMany<E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more