Struct UpdateMany  
pub struct UpdateMany<E>where
    E: EntityTrait,{
    pub(crate) query: UpdateStatement,
    pub(crate) entity: PhantomData<E>,
}Expand description
Defines an UPDATE operation on multiple ActiveModels
Fields§
§query: UpdateStatement§entity: PhantomData<E>Implementations§
§impl<'a, E> UpdateMany<E>where
    E: EntityTrait,
 
impl<'a, E> UpdateMany<E>where
    E: EntityTrait,
pub async fn exec<C>(self, db: &'a C) -> Result<UpdateResult, DbErr>where
    C: ConnectionTrait,
pub async fn exec<C>(self, db: &'a C) -> Result<UpdateResult, DbErr>where
    C: ConnectionTrait,
Execute an update operation on multiple ActiveModels
pub async fn exec_with_returning<C>(
    self,
    db: &'a C,
) -> Result<Vec<<E as EntityTrait>::Model>, DbErr>where
    C: ConnectionTrait,
pub async fn exec_with_returning<C>(
    self,
    db: &'a C,
) -> Result<Vec<<E as EntityTrait>::Model>, DbErr>where
    C: ConnectionTrait,
Execute an update operation and return the updated model (use RETURNING syntax if supported)
§Panics
Panics if the database backend does not support UPDATE RETURNING.
§impl<E> UpdateMany<E>where
    E: EntityTrait,
 
impl<E> UpdateMany<E>where
    E: EntityTrait,
pub fn set<A>(self, model: A) -> UpdateMany<E>where
    A: ActiveModelTrait<Entity = E>,
pub fn set<A>(self, model: A) -> UpdateMany<E>where
    A: ActiveModelTrait<Entity = E>,
Add the models to update to Self
pub fn col_expr<T>(self, col: T, expr: SimpleExpr) -> UpdateMany<E>where
    T: IntoIden,
pub fn col_expr<T>(self, col: T, expr: SimpleExpr) -> UpdateMany<E>where
    T: IntoIden,
Creates a SimpleExpr from a column
Trait Implementations§
§impl<E> Clone for UpdateMany<E>where
    E: Clone + EntityTrait,
 
impl<E> Clone for UpdateMany<E>where
    E: Clone + EntityTrait,
§fn clone(&self) -> UpdateMany<E>
 
fn clone(&self) -> UpdateMany<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read more§impl<E> Debug for UpdateMany<E>where
    E: Debug + EntityTrait,
 
impl<E> Debug for UpdateMany<E>where
    E: Debug + EntityTrait,
§impl<E> QueryFilter for UpdateMany<E>where
    E: EntityTrait,
 
impl<E> QueryFilter for UpdateMany<E>where
    E: EntityTrait,
type QueryStatement = UpdateStatement
§fn query(&mut self) -> &mut UpdateStatement
 
fn query(&mut self) -> &mut UpdateStatement
Add the query to perform a FILTER on
§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
§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
§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
§impl<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
§fn query(&mut self) -> &mut UpdateStatement
 
fn query(&mut self) -> &mut UpdateStatement
Get a mutable ref to the query builder
§fn as_query(&self) -> &UpdateStatement
 
fn as_query(&self) -> &UpdateStatement
Get an immutable ref to the query builder
§fn into_query(self) -> UpdateStatement
 
fn into_query(self) -> UpdateStatement
Take ownership of the query builder
§fn build(&self, db_backend: DatabaseBackend) -> Statement
 
fn build(&self, db_backend: DatabaseBackend) -> Statement
Build the query as 
StatementAuto Trait Implementations§
impl<E> Freeze for UpdateMany<E>
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§
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,
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§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