[][src]Trait c3p0_pg::postgres::GenericConnection

pub trait GenericConnection {
    fn execute(&self, query: &str, params: &[&dyn ToSql]) -> Result<u64, Error>;
fn query(
        &'a self,
        query: &str,
        params: &[&dyn ToSql]
    ) -> Result<Rows, Error>;
fn prepare(&'a self, query: &str) -> Result<Statement<'a>, Error>;
fn prepare_cached(&'a self, query: &str) -> Result<Statement<'a>, Error>;
fn transaction(&'a self) -> Result<Transaction<'a>, Error>;
fn batch_execute(&self, query: &str) -> Result<(), Error>;
fn is_active(&self) -> bool; }

A trait allowing abstraction over connections and transactions

Required methods

fn execute(&self, query: &str, params: &[&dyn ToSql]) -> Result<u64, Error>

Like Connection::execute.

fn query(&'a self, query: &str, params: &[&dyn ToSql]) -> Result<Rows, Error>

Like Connection::query.

fn prepare(&'a self, query: &str) -> Result<Statement<'a>, Error>

Like Connection::prepare.

fn prepare_cached(&'a self, query: &str) -> Result<Statement<'a>, Error>

Like Connection::prepare_cached.

fn transaction(&'a self) -> Result<Transaction<'a>, Error>

Like Connection::transaction.

fn batch_execute(&self, query: &str) -> Result<(), Error>

Like Connection::batch_execute.

fn is_active(&self) -> bool

Like Connection::is_active.

Loading content...

Implementors

impl GenericConnection for Connection[src]

impl<'a> GenericConnection for Transaction<'a>[src]

Loading content...