pub struct SelectList {
pub columns: Vec<Expr>,
pub preload_columns: Vec<Expr>,
}Expand description
The projection: SELECT a, b, c, or * when nothing was asked for.
Preload columns are kept apart from the ones the caller selected so that a
preloader can be an ordinary query mod while the mapper still knows how many of
the returned columns belong to the root object — that is what
count_select_cols is for. They render as one list,
preloads last.
This is the one clause whose “absent” rendering is not empty: a SELECT with
no list is not a statement, and * is what the grammar asks for. Absence is
therefore still observable through is_empty.
Fields§
§columns: Vec<Expr>What the caller selected.
preload_columns: Vec<Expr>Columns a preloader added, rendered after columns.
Implementations§
Source§impl SelectList
impl SelectList
Sourcepub fn count_select_cols(&self) -> usize
pub fn count_select_cols(&self) -> usize
How many columns the caller selected, ignoring preloads.
Sourcepub fn set_select(&mut self, columns: impl IntoExprList)
pub fn set_select(&mut self, columns: impl IntoExprList)
Replace the selected columns.
Sourcepub fn append_select(&mut self, columns: impl IntoExprList)
pub fn append_select(&mut self, columns: impl IntoExprList)
Add to the selected columns.
Sourcepub fn set_preload_select(&mut self, columns: impl IntoExprList)
pub fn set_preload_select(&mut self, columns: impl IntoExprList)
Replace the preload columns.
Sourcepub fn append_preload_select(&mut self, columns: impl IntoExprList)
pub fn append_preload_select(&mut self, columns: impl IntoExprList)
Add to the preload columns.
Sourcepub fn append_column(&mut self, column: impl IntoExpr)
pub fn append_column(&mut self, column: impl IntoExpr)
Add one column.
Trait Implementations§
Source§impl Clone for SelectList
impl Clone for SelectList
Source§fn clone(&self) -> SelectList
fn clone(&self) -> SelectList
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more