[][src]Trait diesel_crud::Cud

pub trait Cud<BaseConnection>: Sized where
    BaseConnection: Connection<TransactionManager = AnsiTransactionManager> + 'static,
    BaseConnection::Backend: UsesAnsiSavepointSyntax
{ type Query: CudQuery<BaseConnection>; fn query(self) -> Self::Query; fn execute(self, db: &Db<BaseConnection>) -> Result<(), Error> { ... } }

Trait which is implemented by create, update, and delete operations.

Associated Types

type Query: CudQuery<BaseConnection>

Loading content...

Required methods

fn query(self) -> Self::Query

Loading content...

Provided methods

fn execute(self, db: &Db<BaseConnection>) -> Result<(), Error>

Loading content...

Implementors

impl<T, Table, BaseConnection> Cud<BaseConnection> for T where
    T: Create<Table = Table> + Insertable<Table>,
    Table: Table,
    T::Values: CanInsertInSingleQuery<BaseConnection::Backend>,
    T::Values: QueryFragment<BaseConnection::Backend>,
    Table::FromClause: QueryFragment<BaseConnection::Backend>,
    BaseConnection: Connection<TransactionManager = AnsiTransactionManager> + 'static,
    BaseConnection::Backend: UsesAnsiSavepointSyntax
[src]

type Query = InsertStatement<Table, Self::Values>

Loading content...