[−][src]Trait roa_pg::GenericClient
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>(
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Like Client::execute
.
#[must_use]fn execute_raw<'b, 'life0, 'life1, 'async_trait, I, T>(
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Like Client::execute_raw
.
#[must_use]fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Like Client::query
.
#[must_use]fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Like Client::query_one
.
#[must_use]fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Like Client::query_opt
.
#[must_use]fn query_raw<'b, 'life0, 'life1, 'async_trait, T, I>(
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
Self: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
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>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
query: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> 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>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 self,
query: &'life1 str,
parameter_types: &'life2 [Type]
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> 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<'life0>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'life0>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
Self: 'async_trait,
Like Client::transaction
.
Implementors
impl GenericClient for Client
[src]
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
[src]
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
fn execute_raw<'b, 'life0, 'life1, 'async_trait, I, T>(
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Client: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Client: 'async_trait,
fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
[src]
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Client: 'async_trait,
fn query_raw<'b, 'life0, 'life1, 'async_trait, T, I>(
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Client: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Client: 'async_trait,
fn prepare<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
Client: 'async_trait,
[src]
&'life0 self,
query: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
Client: '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>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Client: 'async_trait,
[src]
&'life0 self,
query: &'life1 str,
parameter_types: &'life2 [Type]
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Client: 'async_trait,
fn transaction<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'life0>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
Client: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'life0>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
Client: 'async_trait,
impl<'_> GenericClient for Transaction<'_>
[src]
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
fn execute_raw<'b, 'life0, 'life1, 'async_trait, I, T>(
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Transaction<'_>: 'async_trait,
fn query<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
query: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
fn query_one<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Row, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
fn query_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: &'life2 [&'life3 (dyn ToSql + 'life3 + Sync)]
) -> Pin<Box<dyn Future<Output = Result<Option<Row>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
Transaction<'_>: 'async_trait,
fn query_raw<'b, 'life0, 'life1, 'async_trait, T, I>(
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
statement: &'life1 T,
params: I
) -> Pin<Box<dyn Future<Output = Result<RowStream, Error>> + 'async_trait + Send>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
I: IntoIterator<Item = &'b (dyn ToSql + 'b)> + Sync + Send + 'async_trait,
T: ToStatement + Sync + Send + 'async_trait + ?Sized,
<I as IntoIterator>::IntoIter: ExactSizeIterator,
Transaction<'_>: 'async_trait,
fn prepare<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
query: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
Transaction<'_>: '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>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Transaction<'_>: 'async_trait,
[src]
&'life0 self,
query: &'life1 str,
parameter_types: &'life2 [Type]
) -> Pin<Box<dyn Future<Output = Result<Statement, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Transaction<'_>: 'async_trait,
fn transaction<'a, 'async_trait>(
&'a mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'a>, Error>> + 'async_trait + Send>> where
'a: 'async_trait,
Transaction<'_>: 'async_trait,
[src]
&'a mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'a>, Error>> + 'async_trait + Send>> where
'a: 'async_trait,
Transaction<'_>: 'async_trait,