pub struct Rows<'inner, S> { /* private fields */ }Expand description
Rows keeps track of all rows in the current query.
This is the base type for other query types like crate::args::Aggregate and crate::args::Query. It contains basic query functionality like joining tables and filters.
Rows mutability is only about which rows are included. Adding new columns does not require mutating Rows.
Implementations§
Source§impl<'inner, S> Rows<'inner, S>
impl<'inner, S> Rows<'inner, S>
Sourcepub fn join<T: Table>(
&mut self,
j: impl IntoJoinable<'inner, S, Typ = T>,
) -> Expr<'inner, S, T>
pub fn join<T: Table>( &mut self, j: impl IntoJoinable<'inner, S, 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.
The parameter must be a table name from the schema like v0::User.
This table can be filtered by #[index]: rows.join(v0::User.score(100)).
See also Self::filter_some if you want to join a table that is filtered by #[unique].