pub struct PostgresClient { /* private fields */ }Implementations§
Source§impl PostgresClient
impl PostgresClient
pub fn as_sqlx_pool(&self) -> &PgPool
Trait Implementations§
Source§impl Client for PostgresClient
impl Client for PostgresClient
Source§fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'life3 (dyn Param + Sync)],
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'life3 (dyn Param + Sync)],
) -> Pin<Box<dyn Future<Output = Result<ExecuteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute a sql command. returns the number of rows that were affected
Source§fn fetch_rows<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'life3 (dyn Param + Sync)],
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fetch_rows<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [&'life3 (dyn Param + Sync)],
) -> Pin<Box<dyn Future<Output = Result<Vec<Row>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Runs SQL and returns a collection of rows from the database.
Source§fn fetch_many<'s, 'args, 't, 'life0, 'life1, 'async_trait>(
&'life0 self,
fetches: &'life1 [Fetch<'s, 'args, 't>],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Row>>>> + Send + 'async_trait>>where
Self: 'async_trait,
's: 'async_trait,
'args: 'async_trait,
't: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_many<'s, 'args, 't, 'life0, 'life1, 'async_trait>(
&'life0 self,
fetches: &'life1 [Fetch<'s, 'args, 't>],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Row>>>> + Send + 'async_trait>>where
Self: 'async_trait,
's: 'async_trait,
'args: 'async_trait,
't: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run several
fetch_rows command on the same connection in the connection poolfn syntax(&self) -> Syntax
Source§impl Clone for PostgresClient
impl Clone for PostgresClient
Source§fn clone(&self) -> PostgresClient
fn clone(&self) -> PostgresClient
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgresClient
impl Debug for PostgresClient
Source§impl From<Pool<Postgres>> for PostgresClient
impl From<Pool<Postgres>> for PostgresClient
Source§fn from(pool: PgPool) -> PostgresClient
fn from(pool: PgPool) -> PostgresClient
Converts to this type from the input type.
Source§impl TransactStart for PostgresClient
impl TransactStart for PostgresClient
Auto Trait Implementations§
impl Freeze for PostgresClient
impl !RefUnwindSafe for PostgresClient
impl Send for PostgresClient
impl Sync for PostgresClient
impl Unpin for PostgresClient
impl !UnwindSafe for PostgresClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more