Trait 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>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§