pub struct Statement { /* private fields */ }
Expand description
A cached prepared statement.
Implementations§
source§impl Statement
impl Statement
sourcepub async fn execute(&mut self, params: impl IntoParams) -> Result<usize>
pub async fn execute(&mut self, params: impl IntoParams) -> Result<usize>
Execute queries on the statement, check [Connection::execute
] for usage.
sourcepub async fn query(&mut self, params: impl IntoParams) -> Result<Rows>
pub async fn query(&mut self, params: impl IntoParams) -> Result<Rows>
Execute a query on the statement, check [Connection::query
] for usage.
sourcepub async fn query_row(&mut self, params: impl IntoParams) -> Result<Row>
pub async fn query_row(&mut self, params: impl IntoParams) -> Result<Row>
sourcepub fn parameter_count(&self) -> usize
pub fn parameter_count(&self) -> usize
Fetch the amount of parameters in the prepared statement.
sourcepub fn parameter_name(&self, idx: i32) -> Option<&str>
pub fn parameter_name(&self, idx: i32) -> Option<&str>
Fetch the parameter name at the provided index.
Auto Trait Implementations§
impl Freeze for Statement
impl !RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl !UnwindSafe for Statement
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request