pub struct Query<'t, 'inner, S> { /* private fields */ }Expand description
This is the type used by the crate::Transaction::query method.
Implementations§
Source§impl<'t, 'inner, S> Query<'t, 'inner, S>
impl<'t, 'inner, S> Query<'t, 'inner, S>
Sourcepub fn into_vec<O>(&self, select: impl IntoSelect<'inner, S, Out = O>) -> Vec<O>
pub fn into_vec<O>(&self, select: impl IntoSelect<'inner, S, Out = O>) -> Vec<O>
Turn a database query into a Vec of results.
The order of rows that is returned is unstable. This means that the order may change between any two executions of the exact same query. If a specific order (or even a consistent order) is required, then you have to use something like slice::sort.
Sourcepub fn into_iter<O>(
&self,
select: impl IntoSelect<'inner, S, Out = O>,
) -> Iter<'t, O>
pub fn into_iter<O>( &self, select: impl IntoSelect<'inner, S, Out = O>, ) -> Iter<'t, O>
Turn a database query into an iterator of results.
The order of rows that is returned is unstable. This means that the order may change between any two executions of the exact same query. If a specific order (or even a consistent order) is required, then you have to use something like slice::sort.
Methods from Deref<Target = Rows<'inner, S>>§
Sourcepub fn join<T: Table<Schema = S>>(
&mut self,
j: impl Joinable<'inner, Typ = T>,
) -> Expr<'inner, S, T>
pub fn join<T: Table<Schema = S>>( &mut self, j: impl Joinable<'inner, Typ = T>, ) -> Expr<'inner, S, T>
Join a table, this is like a super simple Iterator::flat_map but for queries.
After this operation Rows has rows for the combinations of each original row with each row of the table. (Also called the “Carthesian product”)
The expression that is returned refers to the joined table.