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]

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: Clone, U: Clone, V: Clone> Clone for UpdateStatement<T, U, V>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy, U: Copy, V: Copy> Copy for UpdateStatement<T, U, V>
[src]

impl<T: Debug, U: Debug, V: Debug> Debug for UpdateStatement<T, U, V>
[src]

Formats the value using the given formatter.

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]

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]