pub struct SelectStatement {
pub expr: Box<SetExpression>,
pub order_by: Vec<OrderBy>,
pub slice: Option<Slice>,
}
Expand description
Representation of a select statement, that is, the only type of queries allowed.
Fields§
§expr: Box<SetExpression>
the query expression
order_by: Vec<OrderBy>
if non-empty, an sort-order that is applied to the rows returned as result
slice: Option<Slice>
an optional slice clause, which can restrict the rows returned to a window within the
set of rows as generated by expr
and order_by
.
Implementations§
Source§impl SelectStatement
impl SelectStatement
Sourcepub fn get_table_references(
&self,
default_schema: Identifier,
) -> Vec<ResourceId>
pub fn get_table_references( &self, default_schema: Identifier, ) -> Vec<ResourceId>
This function returns the referenced tables in the provided intermediate_ast
Note that we provide a default_schema
in case the table expression
does not have any associated schema. This default_schema
is
used to construct the resource_id
, as we cannot have this field empty.
In case the table expression already has an associated schema,
then it’s used instead of default_schema
. Although the DQL endpoint
would require both to be equal, we have chosen to not fail here
as this would imply the caller to always know beforehand the referenced
schemas.
Return:
- The vector with all tables referenced by the intermediate ast, encoded as resource ids.
Trait Implementations§
Source§impl Clone for SelectStatement
impl Clone for SelectStatement
Source§fn clone(&self) -> SelectStatement
fn clone(&self) -> SelectStatement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more