pub trait GenericClient: Sealed {
    fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        query: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send + 'async_trait,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait
; fn execute_raw<'life0, 'life1, 'async_trait, P, I, T>(
        &'life0 self,
        statement: &'life1 T,
        params: I
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send + 'async_trait,
        P: BorrowToSql + 'async_trait,
        I: IntoIterator<Item = P> + Sync + Send + 'async_trait,
        I::IntoIter: ExactSizeIterator,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        query: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send + 'async_trait,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait
; fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        statement: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send + 'async_trait,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait
; fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
        &'life0 self,
        statement: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send + 'async_trait,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait
; fn query_raw<'life0, 'life1, 'async_trait, T, P, I>(
        &'life0 self,
        statement: &'life1 T,
        params: I
    ) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + Send + 'async_trait>>
    where
        T: ?Sized + ToStatement + Sync + Send + 'async_trait,
        P: BorrowToSql + 'async_trait,
        I: IntoIterator<Item = P> + Sync + Send + 'async_trait,
        I::IntoIter: ExactSizeIterator,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn prepare<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn prepare_typed<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        parameter_types: &'life2 [Type]
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; fn prepare_cached<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn prepare_typed_cached<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        types: &'life2 [Type]
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait
; fn transaction<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Transaction<'_>, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn batch_execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; }
Expand description

A trait allowing abstraction over connections and transactions.

This trait is “sealed”, and cannot be implemented outside of this crate.

Required Methods§

Like Client::execute.

Like Client::execute_raw.

Like Client::query.

Like Client::query_one.

Like Client::query_opt.

Like Client::query_raw.

Like Client::prepare.

Like Client::prepare_typed.

Like Client::transaction.

Like Client::batch_execute.

Implementors§