Trait diesel::prelude::Insertable
[−]
[src]
pub trait Insertable<T: Table, DB: Backend> { type Values: InsertValues<DB>; 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]
and &Vec<T>
for inserting more than
one record.
Associated Types
type Values: InsertValues<DB>
Required Methods
fn values(self) -> Self::Values
Implementors
impl<'a, T, U: 'a, DB> Insertable<T, DB> for &'a [U] where T: Table, DB: Backend, &'a U: Insertable<T, DB>, DB: SupportsDefaultKeyword
impl<'a, T, U, DB> Insertable<T, DB> for &'a Vec<U> where T: Table, DB: Backend, &'a [U]: Insertable<T, DB>
impl<'a, 'insert, DB> Insertable<table, DB> for &'insert NewMigration<'a> where DB: Backend, 'insert: 'a, (ColumnInsertValue<version, Bound<version::SqlType, &'insert &'a str>>,): InsertValues<DB>