Trait derive_sql::proxy::sqlite::SqliteTrait

source ·
pub trait SqliteTrait {
    // Required methods
    fn execute<P>(&self, sql: &str, params: P) -> Result<usize>
       where P: Params;
    fn query_first<T, P, F>(&self, sql: &str, params: P, f: F) -> Result<T>
       where P: Params,
             F: FnOnce(&Row<'_>) -> Result<T>;
    fn query_map<T, P, F>(&self, sql: &str, params: P, f: F) -> Result<Vec<T>>
       where P: Params,
             F: FnMut(&Row<'_>) -> Result<T>;
}
Expand description

Generic trait exposing methods used for interaction with SQLite in DeriveSqlite macro implementation.

Required Methods§

source

fn execute<P>(&self, sql: &str, params: P) -> Result<usize>
where P: Params,

source

fn query_first<T, P, F>(&self, sql: &str, params: P, f: F) -> Result<T>
where P: Params, F: FnOnce(&Row<'_>) -> Result<T>,

source

fn query_map<T, P, F>(&self, sql: &str, params: P, f: F) -> Result<Vec<T>>
where P: Params, F: FnMut(&Row<'_>) -> Result<T>,

Object Safety§

This trait is not object safe.

Implementors§