pub struct Update<'t, DB, T, CT>{
pub change: CT,
/* private fields */
}
Expand description
更新操作
Fields§
§change: CT
Implementations§
Source§impl<'t, DB, T, CT> Update<'t, DB, T, CT>
impl<'t, DB, T, CT> Update<'t, DB, T, CT>
pub fn new(val: CT) -> Update<'t, DB, T, CT>
pub fn model<'q: 't>(val: &'q T, source: &Option<&T>) -> Update<'t, DB, T, CT>
pub fn empty_change(&self) -> bool
pub fn sql_sets(&self) -> String
pub fn sql_values_sets(&self) -> String
pub fn bind_values<'q>( &'q self, res: Query<'q, DB, <DB as HasArguments<'_>>::Arguments>, ) -> Query<'q, DB, <DB as HasArguments<'_>>::Arguments>
pub async fn execute_by_scalar_pk<'c, PT, E>(
&self,
pk_scalar: PT,
executor: E,
) -> Result<<DB as Database>::QueryResult, Error>where
for<'q> PT: 'q + Send + Encode<'q, DB> + Type<DB>,
for<'n> <DB as HasArguments<'n>>::Arguments: Arguments<'n> + IntoArguments<'n, DB>,
E: Executor<'c, Database = 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, 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>,
E: Executor<'c, Database = DB>,
Auto Trait Implementations§
impl<'t, DB, T, CT> Freeze for Update<'t, DB, T, CT>where
CT: Freeze,
impl<'t, DB, T, CT> RefUnwindSafe for Update<'t, DB, T, CT>
impl<'t, DB, T, CT> Send for Update<'t, DB, T, CT>
impl<'t, DB, T, CT> Sync for Update<'t, DB, T, CT>
impl<'t, DB, T, CT> Unpin for Update<'t, DB, T, CT>
impl<'t, DB, T, CT> UnwindSafe for Update<'t, DB, T, CT>
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