pub struct PgClient { /* private fields */ }Expand description
A wrapper around tokio_postgres::Client implementing the NextSQL Client trait.
Implementations§
Trait Implementations§
Source§impl Client for PgClient
impl Client for PgClient
type Error = Error
type Row = PgRow
type Transaction<'a> = PgTransaction<'a>
Source§fn query(
&self,
sql: &str,
params: &[&dyn ToSqlParam],
) -> impl Future<Output = Result<Vec<Self::Row>, Self::Error>> + Send
fn query( &self, sql: &str, params: &[&dyn ToSqlParam], ) -> impl Future<Output = Result<Vec<Self::Row>, Self::Error>> + Send
Execute a query that returns rows.
Source§fn execute(
&self,
sql: &str,
params: &[&dyn ToSqlParam],
) -> impl Future<Output = Result<u64, Self::Error>> + Send
fn execute( &self, sql: &str, params: &[&dyn ToSqlParam], ) -> impl Future<Output = Result<u64, Self::Error>> + Send
Execute a statement that returns the number of affected rows.
Source§fn transaction(
&mut self,
) -> impl Future<Output = Result<Self::Transaction<'_>, Self::Error>> + Send
fn transaction( &mut self, ) -> impl Future<Output = Result<Self::Transaction<'_>, Self::Error>> + Send
Begin a new transaction.
Auto Trait Implementations§
impl Freeze for PgClient
impl !RefUnwindSafe for PgClient
impl Send for PgClient
impl Sync for PgClient
impl Unpin for PgClient
impl UnsafeUnpin for PgClient
impl !UnwindSafe for PgClient
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