pub struct StatementNamed<'a> { /* private fields */ }Expand description
a named statement that can be prepared separately
Implementations§
Source§impl<'a> StatementNamed<'a>
impl<'a> StatementNamed<'a>
Sourcepub fn bind<P>(self, params: P) -> StatementQuery<'a, P>
pub fn bind<P>(self, params: P) -> StatementQuery<'a, P>
function the same as Statement::bind
Sourcepub fn bind_dyn<'p, 't>(
self,
params: &'p [&'t (dyn ToSql + Sync)],
) -> StatementQuery<'a, impl ExactSizeIterator<Item = &'t (dyn ToSql + Sync)> + Clone + 'p>
pub fn bind_dyn<'p, 't>( self, params: &'p [&'t (dyn ToSql + Sync)], ) -> StatementQuery<'a, impl ExactSizeIterator<Item = &'t (dyn ToSql + Sync)> + Clone + 'p>
function the same as Statement::bind_dyn
Sourcepub fn bind_none(self) -> StatementQuery<'a, [bool; 0]>
pub fn bind_none(self) -> StatementQuery<'a, [bool; 0]>
function the same as Statement::bind_none
Trait Implementations§
Source§impl<'c, C> Execute<&'c C> for StatementNamed<'_>where
C: Prepare,
impl<'c, C> Execute<&'c C> for StatementNamed<'_>where
C: Prepare,
Source§type ExecuteOutput = ResultFuture<IntoGuarded<'c, Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'c>>, C>>
type ExecuteOutput = ResultFuture<IntoGuarded<'c, Pin<Box<dyn Future<Output = Result<Statement, Error>> + Send + 'c>>, C>>
outcome of execute.
used for single time database response: number of rows affected by execution for example.
Source§type QueryOutput = <StatementNamed<'_> as Execute<&'c C>>::ExecuteOutput
type QueryOutput = <StatementNamed<'_> as Execute<&'c C>>::ExecuteOutput
outcome of query.
used for repeated database response: database rows for example Read more
Source§fn execute(self, cli: &'c C) -> Self::ExecuteOutput
fn execute(self, cli: &'c C) -> Self::ExecuteOutput
define how a statement is executed with single time response
Source§fn query(self, cli: &'c C) -> Self::QueryOutput
fn query(self, cli: &'c C) -> Self::QueryOutput
define how a statement is queried with repeated response
Source§impl<'c, 's> Execute<&'c mut PoolConnection<'_>> for StatementNamed<'s>where
's: 'c,
impl<'c, 's> Execute<&'c mut PoolConnection<'_>> for StatementNamed<'s>where
's: 'c,
Source§type ExecuteOutput = StatementCacheFuture<'c>
type ExecuteOutput = StatementCacheFuture<'c>
outcome of execute.
used for single time database response: number of rows affected by execution for example.
Source§type QueryOutput = <StatementNamed<'s> as Execute<&'c mut PoolConnection<'_>>>::ExecuteOutput
type QueryOutput = <StatementNamed<'s> as Execute<&'c mut PoolConnection<'_>>>::ExecuteOutput
outcome of query.
used for repeated database response: database rows for example Read more
Source§fn execute(self, cli: &'c mut PoolConnection<'_>) -> Self::ExecuteOutput
fn execute(self, cli: &'c mut PoolConnection<'_>) -> Self::ExecuteOutput
define how a statement is executed with single time response
Source§fn query(self, cli: &'c mut PoolConnection<'_>) -> Self::QueryOutput
fn query(self, cli: &'c mut PoolConnection<'_>) -> Self::QueryOutput
define how a statement is queried with repeated response
Source§impl<'c, C> ExecuteBlocking<&'c C> for StatementNamed<'_>where
C: Prepare,
impl<'c, C> ExecuteBlocking<&'c C> for StatementNamed<'_>where
C: Prepare,
type ExecuteOutput = Result<StatementGuarded<'c, C>, Error>
type QueryOutput = <StatementNamed<'_> as ExecuteBlocking<&'c C>>::ExecuteOutput
fn execute_blocking(self, cli: &'c C) -> Self::ExecuteOutput
fn query_blocking(self, cli: &'c C) -> Self::QueryOutput
Auto Trait Implementations§
impl<'a> Freeze for StatementNamed<'a>
impl<'a> RefUnwindSafe for StatementNamed<'a>
impl<'a> Send for StatementNamed<'a>
impl<'a> Sync for StatementNamed<'a>
impl<'a> Unpin for StatementNamed<'a>
impl<'a> UnwindSafe for StatementNamed<'a>
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