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
Implementors
impl<'a, T, U> Insertable<T> for &'a [U] where T: Table, &'a U: Insertable<T>
impl<'a, T, U> Insertable<T> for &'a Vec<U> where T: Table, &'a U: Insertable<T>
impl<'update: 'a, 'a> Insertable<table> for &'update NewMigration<'a>