pub struct Pool { /* private fields */ }Expand description
connection pool for a set of connections to database.
Implementations§
Trait Implementations§
Source§impl<'c, 's, I, P> Execute<&'c Pool> for Iwhere
I: IntoIterator,
I::IntoIter: Iterator<Item = StatementQuery<'s, P>> + Send + 'c,
P: AsParams + Send + 'c,
's: 'c,
Available on non-crate feature nightly only.
impl<'c, 's, I, P> Execute<&'c Pool> for Iwhere
I: IntoIterator,
I::IntoIter: Iterator<Item = StatementQuery<'s, P>> + Send + 'c,
P: AsParams + Send + 'c,
's: 'c,
Available on non-crate feature
nightly only.Source§type ExecuteOutput = Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'c>>
type ExecuteOutput = Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'c>>
outcome of execute.
used for single time database response: number of rows affected by execution for example.
Source§type QueryOutput = Pin<Box<dyn Future<Output = Result<Vec<GenericRowStream<Arc<[Column]>, Typed>>, Error>> + Send + 'c>>
type QueryOutput = Pin<Box<dyn Future<Output = Result<Vec<GenericRowStream<Arc<[Column]>, Typed>>, Error>> + Send + 'c>>
outcome of query.
used for repeated database response: database rows for example Read more
Source§fn execute(self, pool: &'c Pool) -> Self::ExecuteOutput
fn execute(self, pool: &'c Pool) -> Self::ExecuteOutput
define how a statement is executed with single time response
Source§fn query(self, pool: &'c Pool) -> Self::QueryOutput
fn query(self, pool: &'c Pool) -> Self::QueryOutput
define how a statement is queried with repeated response
Source§impl<'c, 's, P> Execute<&'c Pool> for StatementQuery<'s, P>where
P: AsParams + Send + 'c,
's: 'c,
Available on non-crate feature nightly only.
impl<'c, 's, P> Execute<&'c Pool> for StatementQuery<'s, P>where
P: AsParams + Send + 'c,
's: 'c,
Available on non-crate feature
nightly only.Source§type ExecuteOutput = Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'c>>
type ExecuteOutput = Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'c>>
outcome of execute.
used for single time database response: number of rows affected by execution for example.
Source§type QueryOutput = Pin<Box<dyn Future<Output = Result<GenericRowStream<Arc<[Column]>, Typed>, Error>> + Send + 'c>>
type QueryOutput = Pin<Box<dyn Future<Output = Result<GenericRowStream<Arc<[Column]>, Typed>, Error>> + Send + 'c>>
outcome of query.
used for repeated database response: database rows for example Read more
Source§fn execute(self, pool: &'c Pool) -> Self::ExecuteOutput
fn execute(self, pool: &'c Pool) -> Self::ExecuteOutput
define how a statement is executed with single time response
Source§fn query(self, pool: &'c Pool) -> Self::QueryOutput
fn query(self, pool: &'c Pool) -> Self::QueryOutput
define how a statement is queried with repeated response
Auto Trait Implementations§
impl !Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnwindSafe for Pool
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