Trait diesel::Insertable [] [src]

pub trait Insertable<T: Table> {
    type Columns: InsertableColumns<T>;
    type Values: Expression<SqlType=Self::Columns::SqlType>;
    fn columns() -> Self::Columns;
    fn values(self) -> Self::Values;
}

Represents that a structure can be used to to insert a new row into the database. Implementations can be automatically generated by #[insertable_into]. This is automatically implemented for &[T], Vec<T> and &Vec<T> for inserting more than one record.

Associated Types

type Columns: InsertableColumns<T>

type Values: Expression<SqlType=Self::Columns::SqlType>

Required Methods

fn columns() -> Self::Columns

fn values(self) -> Self::Values

Implementors