[][src]Trait tokio_postgres::GenericClient

pub trait GenericClient: Sealed {
#[must_use]    fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
        &'life0 self,
        query: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
    where
        T: ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn execute_raw<'b, 'life0, 'life1, 'async_trait, I, T: ?Sized>(
        &'life0 self,
        statement: &'life1 T,
        params: I
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
    where
        T: ToStatement + Sync + Send,
        I: IntoIterator<Item = &'b dyn ToSql> + Sync + Send,
        I::IntoIter: ExactSizeIterator,
        'b: 'async_trait,
        I: 'async_trait,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
        &'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: ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
        &'life0 self,
        statement: &'life1 T,
        params: &'life2 [&'life3 (dyn ToSql + Sync)]
    ) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>>
    where
        T: ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
        &'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: ToStatement + Sync + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn query_raw<'b, 'life0, 'life1, 'async_trait, T: ?Sized, I>(
        &'life0 self,
        statement: &'life1 T,
        params: I
    ) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + Send + 'async_trait>>
    where
        T: ToStatement + Sync + Send,
        I: IntoIterator<Item = &'b dyn ToSql> + Sync + Send,
        I::IntoIter: ExactSizeIterator,
        'b: 'async_trait,
        T: 'async_trait,
        I: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn prepare<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] 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
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn transaction<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Transaction<'_>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

A trait allowing abstraction over connections and transactions.

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

Required methods

#[must_use]fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
    &'life0 self,
    query: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
    T: ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

Like Client::execute.

#[must_use]fn execute_raw<'b, 'life0, 'life1, 'async_trait, I, T: ?Sized>(
    &'life0 self,
    statement: &'life1 T,
    params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
    T: ToStatement + Sync + Send,
    I: IntoIterator<Item = &'b dyn ToSql> + Sync + Send,
    I::IntoIter: ExactSizeIterator,
    'b: 'async_trait,
    I: 'async_trait,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Like Client::execute_raw.

#[must_use]fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
    &'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: ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

Like Client::query.

#[must_use]fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
    &'life0 self,
    statement: &'life1 T,
    params: &'life2 [&'life3 (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + Send + 'async_trait>> where
    T: ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

Like Client::query_one.

#[must_use]fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T: ?Sized>(
    &'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: ToStatement + Sync + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

Like Client::query_opt.

#[must_use]fn query_raw<'b, 'life0, 'life1, 'async_trait, T: ?Sized, I>(
    &'life0 self,
    statement: &'life1 T,
    params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + Send + 'async_trait>> where
    T: ToStatement + Sync + Send,
    I: IntoIterator<Item = &'b dyn ToSql> + Sync + Send,
    I::IntoIter: ExactSizeIterator,
    'b: 'async_trait,
    T: 'async_trait,
    I: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Like Client::query_raw.

#[must_use]fn prepare<'life0, 'life1, 'async_trait>(
    &'life0 self,
    query: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Like Client::prepare.

#[must_use]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
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

Like Client::prepare_typed.

#[must_use]fn transaction<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Like Client::transaction.

Loading content...

Implementors

impl GenericClient for Client[src]

impl<'impl0> GenericClient for Transaction<'impl0>[src]

Loading content...