Struct diesel::query_builder::update_statement::UpdateStatement
[−]
[src]
pub struct UpdateStatement<T, U, V> { /* fields omitted */ }
Methods
impl<T, U, V> UpdateStatement<T, U, V>
[src]
pub fn returning<E>(self, returns: E) -> UpdateQuery<E, Self> where
T: Table,
UpdateQuery<E, Self>: Query,
[src]
T: Table,
UpdateQuery<E, Self>: Query,
Specify what expression is returned after execution of the update
.
Examples
Updating a single record:
let updated_name = diesel::update(users.filter(id.eq(1))) .set(name.eq("Dean")) .returning(name) .get_result(&connection); assert_eq!(Ok("Dean".to_string()), updated_name);
Trait Implementations
impl<T: Debug, U: Debug, V: Debug> Debug for UpdateStatement<T, U, V>
[src]
impl<T: Copy, U: Copy, V: Copy> Copy for UpdateStatement<T, U, V>
[src]
impl<T: Clone, U: Clone, V: Clone> Clone for UpdateStatement<T, U, V>
[src]
fn clone(&self) -> UpdateStatement<T, U, V>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T, U, V, DB> QueryFragment<DB> for UpdateStatement<T, U, V> where
DB: Backend,
T: Table,
T::FromClause: QueryFragment<DB>,
U: QueryFragment<DB>,
V: Changeset<DB>,
[src]
DB: Backend,
T: Table,
T::FromClause: QueryFragment<DB>,
U: QueryFragment<DB>,
V: Changeset<DB>,
fn to_sql(&self, out: &mut DB::QueryBuilder) -> BuildQueryResult
[src]
fn collect_binds(&self, out: &mut DB::BindCollector) -> QueryResult<()>
[src]
fn is_safe_to_cache_prepared(&self) -> bool
[src]
impl<T, U, V> QueryId for UpdateStatement<T, U, V>
[src]
impl<T, U, V> AsQuery for UpdateStatement<T, U, V> where
T: Table,
UpdateQuery<T::AllColumns, UpdateStatement<T, U, V>>: Query,
[src]
T: Table,
UpdateQuery<T::AllColumns, UpdateStatement<T, U, V>>: Query,