Trait medal::db_conn_sqlite_new::Queryable

source ·
trait Queryable {
    // Required methods
    fn query_map_one<T, F>(
        &self,
        sql: &str,
        params: &[&dyn ToSql],
        f: F,
    ) -> Result<Option<T>>
       where F: FnOnce(&Row<'_, '_>) -> T;
    fn query_map_many<T, F>(
        &self,
        sql: &str,
        params: &[&dyn ToSql],
        f: F,
    ) -> Result<Vec<T>>
       where F: FnMut(&Row<'_, '_>) -> T;
    fn exists(&self, sql: &str, params: &[&dyn ToSql]) -> bool;
    fn get_last_id(&self) -> Option<i32>;
    fn reconnect_concrete(config: &Config) -> Self;
}

Required Methods§

source

fn query_map_one<T, F>( &self, sql: &str, params: &[&dyn ToSql], f: F, ) -> Result<Option<T>>
where F: FnOnce(&Row<'_, '_>) -> T,

source

fn query_map_many<T, F>( &self, sql: &str, params: &[&dyn ToSql], f: F, ) -> Result<Vec<T>>
where F: FnMut(&Row<'_, '_>) -> T,

source

fn exists(&self, sql: &str, params: &[&dyn ToSql]) -> bool

source

fn get_last_id(&self) -> Option<i32>

source

fn reconnect_concrete(config: &Config) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Queryable for Connection

source§

fn query_map_one<T, F>( &self, sql: &str, params: &[&dyn ToSql], f: F, ) -> Result<Option<T>>
where F: FnOnce(&Row<'_, '_>) -> T,

source§

fn query_map_many<T, F>( &self, sql: &str, params: &[&dyn ToSql], f: F, ) -> Result<Vec<T>>
where F: FnMut(&Row<'_, '_>) -> T,

source§

fn exists(&self, sql: &str, params: &[&dyn ToSql]) -> bool

source§

fn get_last_id(&self) -> Option<i32>

source§

fn reconnect_concrete(config: &Config) -> Self

Implementors§