pub struct SqlitePreparedSelect<'stmt, 'conn, 'params> { /* private fields */ }Expand description
Builder for executing a prepared SQLite SELECT.
Implementations§
Source§impl<'stmt, 'conn, 'params> SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> SqlitePreparedSelect<'stmt, 'conn, 'params>
Sourcepub fn params<'next>(
self,
params: &'next [RowValues],
) -> SqlitePreparedSelect<'stmt, 'conn, 'next>
pub fn params<'next>( self, params: &'next [RowValues], ) -> SqlitePreparedSelect<'stmt, 'conn, 'next>
Use middleware RowValues parameters.
Sourcepub fn params_buf<'next>(
self,
params: &'next SqliteParamsBuf,
) -> SqlitePreparedSelect<'stmt, 'conn, 'next>
pub fn params_buf<'next>( self, params: &'next SqliteParamsBuf, ) -> SqlitePreparedSelect<'stmt, 'conn, 'next>
Use a reusable SQLite parameter buffer.
Sourcepub async fn all(self) -> Result<ResultSet, SqlMiddlewareDbError>
pub async fn all(self) -> Result<ResultSet, SqlMiddlewareDbError>
Execute and return all rows as a ResultSet.
§Errors
Returns SqlMiddlewareDbError if execution fails or result conversion encounters an issue.
Sourcepub async fn optional(self) -> Result<Option<CustomDbRow>, SqlMiddlewareDbError>
pub async fn optional(self) -> Result<Option<CustomDbRow>, SqlMiddlewareDbError>
Execute and return the first row, if present.
§Errors
Returns SqlMiddlewareDbError if execution or row conversion fails.
Sourcepub async fn one(self) -> Result<CustomDbRow, SqlMiddlewareDbError>
pub async fn one(self) -> Result<CustomDbRow, SqlMiddlewareDbError>
Execute and return exactly one row.
§Errors
Returns SqlMiddlewareDbError if execution fails, row conversion fails, or no row is returned.
Sourcepub async fn map_one<T, F>(self, mapper: F) -> Result<T, SqlMiddlewareDbError>
pub async fn map_one<T, F>(self, mapper: F) -> Result<T, SqlMiddlewareDbError>
Execute and map exactly one native SQLite row.
§Errors
Returns SqlMiddlewareDbError if execution fails, the mapper fails, or no row is returned.
Sourcepub async fn map_optional<T, F>(
self,
mapper: F,
) -> Result<Option<T>, SqlMiddlewareDbError>
pub async fn map_optional<T, F>( self, mapper: F, ) -> Result<Option<T>, SqlMiddlewareDbError>
Execute and map the first native SQLite row, if present.
§Errors
Returns SqlMiddlewareDbError if execution or the mapper fails.
Auto Trait Implementations§
impl<'stmt, 'conn, 'params> Freeze for SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> !RefUnwindSafe for SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> Send for SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> Sync for SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> Unpin for SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> UnsafeUnpin for SqlitePreparedSelect<'stmt, 'conn, 'params>
impl<'stmt, 'conn, 'params> !UnwindSafe for SqlitePreparedSelect<'stmt, 'conn, 'params>
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