pub trait GenericConnection {
    fn query<T: AsRef<str>>(&mut self, query: T) -> MyResult<QueryResult<'_>>;
    fn first<T: AsRef<str>, U: FromRow>(
        &mut self,
        query: T
    ) -> MyResult<Option<U>>; fn prepare<T: AsRef<str>>(&mut self, query: T) -> MyResult<Stmt<'_>>; fn prep_exec<A, T>(
        &mut self,
        query: A,
        params: T
    ) -> MyResult<QueryResult<'_>>
    where
        A: AsRef<str>,
        T: Into<Params>
; fn first_exec<Q, P, T>(&mut self, query: Q, params: P) -> MyResult<Option<T>>
    where
        Q: AsRef<str>,
        P: Into<Params>,
        T: FromRow
; }
Expand description

A trait allowing abstraction over connections and transactions

Required Methods§

Implementors§