[][src]Trait diesel::query_dsl::UpdateAndFetchResults

pub trait UpdateAndFetchResults<Changes, Output>: Connection {
    fn update_and_fetch(&self, changeset: Changes) -> QueryResult<Output>;
}

A trait defining how to update a record and fetch the updated entry on a certain backend.

The only case where it is required to work with this trait is while implementing a new connection type. Otherwise use SaveChangesDsl

For implementing this trait for a custom backend:

Required methods

fn update_and_fetch(&self, changeset: Changes) -> QueryResult<Output>

See the traits documentation.

Loading content...

Implementors

impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for MysqlConnection where
    Changes: Copy + Identifiable,
    Changes: AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
    Changes::Table: FindDsl<Changes::Id>,
    Update<Changes, Changes>: ExecuteDsl<MysqlConnection>,
    Find<Changes::Table, Changes::Id>: LoadQuery<MysqlConnection, Output>,
    <Changes::Table as Table>::AllColumns: ValidGrouping<()>,
    <<Changes::Table as Table>::AllColumns as ValidGrouping<()>>::IsAggregate: MixedAggregates<No, Output = No>, 
[src]

impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for PgConnection where
    Changes: Copy + AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
    Update<Changes, Changes>: LoadQuery<PgConnection, Output>,
    <Changes::Table as Table>::AllColumns: ValidGrouping<()>,
    <<Changes::Table as Table>::AllColumns as ValidGrouping<()>>::IsAggregate: MixedAggregates<No, Output = No>, 
[src]

impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for SqliteConnection where
    Changes: Copy + Identifiable,
    Changes: AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
    Changes::Table: FindDsl<Changes::Id>,
    Update<Changes, Changes>: ExecuteDsl<SqliteConnection>,
    Find<Changes::Table, Changes::Id>: LoadQuery<SqliteConnection, Output>,
    <Changes::Table as Table>::AllColumns: ValidGrouping<()>,
    <<Changes::Table as Table>::AllColumns as ValidGrouping<()>>::IsAggregate: MixedAggregates<No, Output = No>, 
[src]

impl<Changes, Output, M> UpdateAndFetchResults<Changes, Output> for PooledConnection<M> where
    M: ManageConnection,
    M::Connection: UpdateAndFetchResults<Changes, Output>,
    Self: Connection
[src]

Loading content...