Struct diesel::query_builder::UpdateStatement [] [src]

pub struct UpdateStatement<T, U, V> { /* fields omitted */ }

Methods

impl<T, U, V> UpdateStatement<T, U, V>
[src]

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

[src]

Formats the value using the given formatter.

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]

[src]

Returns a copy of the value. Read more

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]

[src]

[src]

[src]

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

[src]

[src]

impl<T, U, V> AsQuery for UpdateStatement<T, U, V> where
    T: Table,
    UpdateQuery<T::AllColumns, UpdateStatement<T, U, V>>: Query
[src]

[src]