[][src]Trait toql_core::indelup::Indelup

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

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

fn insert_many_sql<I>(entities: I) -> Result<(String, Vec<String>)> 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>)>

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

fn delete_many_sql<I>(entities: I) -> Result<(String, Vec<String>)> 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>)>

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

fn update_many_sql<I>(entities: I) -> Result<(String, Vec<String>)> 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...