[][src]Trait toql::indelup::Indelup

pub trait Indelup<'a, T> where
    T: 'a, 
{ fn insert_one_sql(entity: &T) -> Result<(String, Vec<String>), ToqlError>;
fn insert_many_sql<I>(
        entities: I
    ) -> Result<(String, Vec<String>), ToqlError>
    where
        I: IntoIterator<Item = &'a T> + 'a
;
fn delete_one_sql(entity: &T) -> Result<(String, Vec<String>), ToqlError>;
fn delete_many_sql<I>(
        entities: I
    ) -> Result<(String, Vec<String>), ToqlError>
    where
        I: IntoIterator<Item = &'a T> + 'a
;
fn update_one_sql(entity: &T) -> Result<(String, Vec<String>), ToqlError>;
fn update_many_sql<I>(
        entities: I
    ) -> Result<(String, Vec<String>), ToqlError>
    where
        I: IntoIterator<Item = &'a T> + 'a + Clone
; }

Trait for insert delete and update functions.

Required methods

fn insert_one_sql(entity: &T) -> Result<(String, Vec<String>), ToqlError>

Insert one struct, returns tuple with SQL statement and SQL params or error.

fn insert_many_sql<I>(entities: I) -> Result<(String, Vec<String>), ToqlError> where
    I: IntoIterator<Item = &'a T> + 'a, 

Insert many structs, returns tuple with SQL statement and SQL params or error.

fn delete_one_sql(entity: &T) -> Result<(String, Vec<String>), ToqlError>

Delete one structs, returns tuple with SQL statement and SQL params or error.

fn delete_many_sql<I>(entities: I) -> Result<(String, Vec<String>), ToqlError> where
    I: IntoIterator<Item = &'a T> + 'a, 

Delete many structs, returns tuple with SQL statement and SQL params or error.

fn update_one_sql(entity: &T) -> Result<(String, Vec<String>), ToqlError>

Update one struct, returns tuple with SQL statement and SQL params or error.

fn update_many_sql<I>(entities: I) -> Result<(String, Vec<String>), ToqlError> where
    I: IntoIterator<Item = &'a T> + 'a + Clone

Update many structs, returns tuple with SQL statement and SQL params or error.

Loading content...

Implementors

Loading content...