pub struct SqlitePreparedStatement<'conn> { /* private fields */ }Expand description
Handle to a prepared SQLite statement tied to a connection.
Implementations§
Source§impl<'conn> SqlitePreparedStatement<'conn>
impl<'conn> SqlitePreparedStatement<'conn>
Sourcepub async fn query(
&mut self,
params: &[RowValues],
) -> Result<ResultSet, SqlMiddlewareDbError>
pub async fn query( &mut self, params: &[RowValues], ) -> Result<ResultSet, SqlMiddlewareDbError>
Execute the prepared statement as a query and materialise the rows into a ResultSet.
§Errors
Returns SqlMiddlewareDbError if execution fails or result conversion encounters an issue.
Sourcepub async fn execute(
&mut self,
params: &[RowValues],
) -> Result<usize, SqlMiddlewareDbError>
pub async fn execute( &mut self, params: &[RowValues], ) -> Result<usize, SqlMiddlewareDbError>
Execute the prepared statement as a DML (INSERT/UPDATE/DELETE) returning rows affected.
§Errors
Returns SqlMiddlewareDbError if execution fails or if the result cannot be converted into the expected row count.
Auto Trait Implementations§
impl<'conn> Freeze for SqlitePreparedStatement<'conn>
impl<'conn> !RefUnwindSafe for SqlitePreparedStatement<'conn>
impl<'conn> Send for SqlitePreparedStatement<'conn>
impl<'conn> Sync for SqlitePreparedStatement<'conn>
impl<'conn> Unpin for SqlitePreparedStatement<'conn>
impl<'conn> !UnwindSafe for SqlitePreparedStatement<'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