Trait Query

Source
pub trait Query<F, T>
where F: FnMut(&mut ResultRow<'_, '_>) -> SqliteResult<T>,
{ // Required method fn query<'stmt>( &'stmt mut self, values: &[&dyn ToSql], txform: F, ) -> SqliteResult<QueryResults<'stmt, T, F>>; }
Expand description

Mix in query() convenience function.

Required Methods§

Source

fn query<'stmt>( &'stmt mut self, values: &[&dyn ToSql], txform: F, ) -> SqliteResult<QueryResults<'stmt, T, F>>

Iterate over query results after binding parameters.

Each of the values is bound to the statement (using to_sql) and the statement is executed.

Returns an iterator over rows transformed by txform, which computes a value for each row (or an error).

Implementors§

Source§

impl<F, T> Query<F, T> for PreparedStatement
where F: FnMut(&mut ResultRow<'_, '_>) -> SqliteResult<T>,