[−][src]Struct postgres_query::Caching
A client wrapper which caches prepared queries.
Only queries prepared through the GenericClient::prepare_static
trait method are actually
cached.
Methods
impl<C> Caching<C> where
C: GenericClient,
[src]
C: GenericClient,
pub fn new(client: C) -> Caching<C>
[src]
Wrap a client in a new cache.
pub fn into_inner(self) -> C
[src]
Return the inner client.
impl Caching<Client>
[src]
pub async fn transaction<'_, '_>(
&'_ mut self
) -> Result<Caching<Transaction<'_>>, Error>
[src]
&'_ mut self
) -> Result<Caching<Transaction<'_>>, Error>
Start a new transaction that shares the same cache as the current client.
impl<'_> Caching<Transaction<'_>>
[src]
pub async fn transaction<'_, '_>(
&'_ mut self
) -> Result<Caching<Transaction<'_>>, Error>
[src]
&'_ mut self
) -> Result<Caching<Transaction<'_>>, Error>
Start a new transaction that shares the same cache as the current client.
Trait Implementations
impl<C: Clone> Clone for Caching<C> where
C: GenericClient,
[src]
C: GenericClient,
impl<C> Deref for Caching<C> where
C: GenericClient,
[src]
C: GenericClient,
impl<C> DerefMut for Caching<C> where
C: GenericClient,
[src]
C: GenericClient,
impl<C> From<C> for Caching<C> where
C: GenericClient,
[src]
C: GenericClient,
impl<C> GenericClient for Caching<C> where
C: GenericClient + Sync + Send,
[src]
C: GenericClient + Sync + Send,
fn prepare<'life0, 'life1, 'async_trait>(
&'life0 self,
sql: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, SqlError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
sql: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Statement, SqlError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn prepare_static<'life0, 'async_trait>(
&'life0 self,
sql: &'static str
) -> Pin<Box<dyn Future<Output = Result<Statement, SqlError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
sql: &'static str
) -> Pin<Box<dyn Future<Output = Result<Statement, SqlError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_raw<'a, 'life0, 'life1, 'async_trait>(
&'a self,
statement: &'life0 Statement,
parameters: &'life1 [&'a (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, SqlError>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'a self,
statement: &'life0 Statement,
parameters: &'life1 [&'a (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<u64, SqlError>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_raw<'a, 'life0, 'life1, 'async_trait>(
&'a self,
statement: &'life0 Statement,
parameters: &'life1 [&'a (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<RowStream, SqlError>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'a self,
statement: &'life0 Statement,
parameters: &'life1 [&'a (dyn ToSql + Sync)]
) -> Pin<Box<dyn Future<Output = Result<RowStream, SqlError>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl<C> !RefUnwindSafe for Caching<C>
impl<C> Send for Caching<C> where
C: Send,
C: Send,
impl<C> Sync for Caching<C> where
C: Sync,
C: Sync,
impl<C> Unpin for Caching<C> where
C: Unpin,
C: Unpin,
impl<C> !UnwindSafe for Caching<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,