pub struct UpdateOne<A> where
A: ActiveModelTrait, { /* private fields */ }
Expand description
Defines an UPDATE operation on one ActiveModel
Implementations
impl<'a, A> UpdateOne<A> where
A: 'a + ActiveModelTrait,
impl<'a, A> UpdateOne<A> where
A: 'a + ActiveModelTrait,
pub async fn exec<C>(
self,
db: &'b C
) -> Result<<<A as ActiveModelTrait>::Entity as EntityTrait>::Model, DbErr> where
C: ConnectionTrait,
<<A as ActiveModelTrait>::Entity as EntityTrait>::Model: IntoActiveModel<A>,
pub async fn exec<C>(
self,
db: &'b C
) -> Result<<<A as ActiveModelTrait>::Entity as EntityTrait>::Model, DbErr> where
C: ConnectionTrait,
<<A as ActiveModelTrait>::Entity as EntityTrait>::Model: IntoActiveModel<A>,
Execute an update operation on an ActiveModel
Trait Implementations
impl<A> Clone for UpdateOne<A> where
A: Clone + ActiveModelTrait,
impl<A> Clone for UpdateOne<A> where
A: Clone + ActiveModelTrait,
impl<A> Debug for UpdateOne<A> where
A: Debug + ActiveModelTrait,
impl<A> Debug for UpdateOne<A> where
A: Debug + ActiveModelTrait,
impl<A> QueryFilter for UpdateOne<A> where
A: ActiveModelTrait,
impl<A> QueryFilter for UpdateOne<A> where
A: ActiveModelTrait,
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) -> Self where
F: IntoCondition,
fn filter<F>(self, filter: F) -> Self where
F: IntoCondition,
Add an AND WHERE expression Read more
fn belongs_to<M>(self, model: &M) -> Self where
M: ModelTrait,
fn belongs_to<M>(self, model: &M) -> Self where
M: ModelTrait,
Apply a where condition using the model’s primary key
fn belongs_to_tbl_alias<M>(self, model: &M, tbl_alias: &str) -> Self where
M: ModelTrait,
fn belongs_to_tbl_alias<M>(self, model: &M, tbl_alias: &str) -> Self where
M: ModelTrait,
Perform a check to determine table belongs to a Model through it’s name alias
impl<A> QueryTrait for UpdateOne<A> where
A: ActiveModelTrait,
impl<A> QueryTrait for UpdateOne<A> where
A: ActiveModelTrait,
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 Statement
Auto Trait Implementations
impl<A> !RefUnwindSafe for UpdateOne<A>
impl<A> Send for UpdateOne<A> where
A: Send,
impl<A> Sync for UpdateOne<A> where
A: Sync,
impl<A> Unpin for UpdateOne<A> where
A: Unpin,
impl<A> !UnwindSafe for UpdateOne<A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more