pub struct SelectStatement {
pub select_clause: SelectClause,
pub from_clause: Option<FromClause>,
pub where_clause: Option<WhereExpression>,
pub group_by: Option<GroupByClause>,
pub having_clause: Option<WhereExpression>,
pub order_by: Option<OrderByClause>,
pub limit: Option<LimitClause>,
pub offset: Option<u64>,
pub allow_filtering: bool,
}Expand description
Complete SELECT statement AST
Fields§
§select_clause: SelectClauseSELECT clause - what to return
from_clause: Option<FromClause>FROM clause - which table(s) to query (optional for constant expressions)
where_clause: Option<WhereExpression>WHERE clause - filtering conditions
group_by: Option<GroupByClause>GROUP BY clause - grouping columns
having_clause: Option<WhereExpression>HAVING clause - filtering after grouping
order_by: Option<OrderByClause>ORDER BY clause - sorting specification
limit: Option<LimitClause>LIMIT clause - result size limitation
offset: Option<u64>OFFSET clause - result pagination
allow_filtering: boolAllow filtering flag (for non-indexed queries)
Implementations§
Source§impl SelectStatement
impl SelectStatement
Sourcepub fn select_all_from(table: TableId) -> Self
pub fn select_all_from(table: TableId) -> Self
Create a simple SELECT * FROM table statement
Sourcepub fn requires_aggregation(&self) -> bool
pub fn requires_aggregation(&self) -> bool
Check if this query requires aggregation
Sourcepub fn has_aggregate_functions(&self) -> bool
pub fn has_aggregate_functions(&self) -> bool
Check if this query has aggregate functions
Sourcepub fn get_referenced_columns(&self) -> Vec<ColumnRef>
pub fn get_referenced_columns(&self) -> Vec<ColumnRef>
Get all referenced columns (for query planning).
SELECT * contributes nothing here; the projection is resolved later
against the schema during planning.
Trait Implementations§
Source§impl Clone for SelectStatement
impl Clone for SelectStatement
Source§fn clone(&self) -> SelectStatement
fn clone(&self) -> SelectStatement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectStatement
impl Debug for SelectStatement
Source§impl<'de> Deserialize<'de> for SelectStatement
impl<'de> Deserialize<'de> for SelectStatement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SelectStatement
impl PartialEq for SelectStatement
Source§fn eq(&self, other: &SelectStatement) -> bool
fn eq(&self, other: &SelectStatement) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SelectStatement
impl Serialize for SelectStatement
impl StructuralPartialEq for SelectStatement
Auto Trait Implementations§
impl Freeze for SelectStatement
impl RefUnwindSafe for SelectStatement
impl Send for SelectStatement
impl Sync for SelectStatement
impl Unpin for SelectStatement
impl UnsafeUnpin for SelectStatement
impl UnwindSafe for SelectStatement
Blanket Implementations§
impl<T> Allocation for T
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