pub async fn prepare_typed(&self, query: &str, types: &[Type]) -> Result<Statement, Error> {
        match self.statement_cache.get(query, types) {
            Some(statement) => Ok(statement),
            None => {
                let stmt = self.txn.prepare_typed(query, types).await?;
                self.statement_cache.insert(query, types, stmt.clone());
                Ok(stmt)
            }
        }
    }
/// Creates a new prepared statement using the statement cache if possible.
///
/// See [`tokio_postgres::Transaction::prepare_typed`](#method.prepare_typed-1)
Creates a new prepared statement using the statement cache if possible.
Creates a new prepared statement using the statement cache if possible .
pub async fn prepare_typed(&self, query: &str, types: &[Type]) -> Result<Statement, Error> {
        match self.statement_cache.get(query, types) {
            Some(statement) => Ok(statement),
            None => {
                let stmt = self.txn.prepare_typed(query, types).await?;
                self.statement_cache.insert(query, types, stmt.clone());
                Ok(stmt)
            }
        }
    }
pub async fn prepare_typed ( & self , query : & str , types : & [ Type ] ) -> Result < Statement , Error > { match self . statement_cache . get ( query , types ) { Some ( statement ) => Ok ( statement ) , None => { let stmt = self . txn . prepare_typed ( query , types ) . await ? ; self . statement_cache . insert ( query , types , stmt . clone ( ) ) ; Ok ( stmt ) } } }
Creates a new prepared statement using the statement cache if possible.
Creates a new prepared statement using the statement cache if possible .
&self
query
&str
types
&[Type]
&self
query
&str
types
&[Type]