pub struct PreparedStatement<'conn> { /* private fields */ }Expand description
Prepared statement wrapper for efficient repeated execution
Implementations§
Source§impl<'conn> PreparedStatement<'conn>
impl<'conn> PreparedStatement<'conn>
Sourcepub async fn execute(
&mut self,
params: &[ColumnValue],
) -> Result<QueryResult, DatabaseError>
pub async fn execute( &mut self, params: &[ColumnValue], ) -> Result<QueryResult, DatabaseError>
Execute the prepared statement with given parameters
Sourcepub fn finalize(self) -> Result<(), DatabaseError>
pub fn finalize(self) -> Result<(), DatabaseError>
Finalize the statement and release resources This is called automatically when the PreparedStatement is dropped, but calling it explicitly allows error handling
Auto Trait Implementations§
impl<'conn> !Freeze for PreparedStatement<'conn>
impl<'conn> !RefUnwindSafe for PreparedStatement<'conn>
impl<'conn> !Send for PreparedStatement<'conn>
impl<'conn> !Sync for PreparedStatement<'conn>
impl<'conn> Unpin for PreparedStatement<'conn>
impl<'conn> !UnwindSafe for PreparedStatement<'conn>
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