pub struct PostgresConnection { /* private fields */ }
Expand description
A postgres connection
Implementations§
Trait Implementations§
Source§impl DatabaseConnector for PostgresConnection
impl DatabaseConnector for PostgresConnection
Source§type Transaction = GenericTransactionHandler<PostgresConnection>
type Transaction = GenericTransactionHandler<PostgresConnection>
Database static trait for the database
Source§impl DatabaseExecutor for PostgresConnection
impl DatabaseExecutor for PostgresConnection
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes a query and returns the affected rows
Source§fn fetch_one<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Column>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_one<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Column>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs the query and returns the first row or None
Source§fn fetch_all<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Column>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_all<'life0, 'async_trait>(
&'life0 self,
statement: Statement,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Column>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs the query and returns the first row or None
Auto Trait Implementations§
impl Freeze for PostgresConnection
impl !RefUnwindSafe for PostgresConnection
impl Send for PostgresConnection
impl Sync for PostgresConnection
impl Unpin for PostgresConnection
impl !UnwindSafe for PostgresConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more