pub struct Select {Show 20 fields
pub select_token: AttachedToken,
pub distinct: Option<Distinct>,
pub top: Option<Top>,
pub top_before_distinct: bool,
pub projection: Vec<SelectItem>,
pub into: Option<SelectInto>,
pub from: Vec<TableWithJoins>,
pub lateral_views: Vec<LateralView>,
pub prewhere: Option<Expr>,
pub selection: Option<Expr>,
pub group_by: GroupByExpr,
pub cluster_by: Vec<Expr>,
pub distribute_by: Vec<Expr>,
pub sort_by: Vec<Expr>,
pub having: Option<Expr>,
pub named_window: Vec<NamedWindowDefinition>,
pub qualify: Option<Expr>,
pub window_before_qualify: bool,
pub value_table_mode: Option<ValueTableMode>,
pub connect_by: Option<ConnectBy>,
}Expand description
A restricted variant of SELECT (without CTEs/ORDER BY), which may
appear either as the only body item of a Query, or as an operand
to a set operation like UNION.
Fields§
§select_token: AttachedTokenToken for the SELECT keyword
distinct: Option<Distinct>SELECT [DISTINCT] ...
top: Option<Top>MSSQL syntax: TOP (<N>) [ PERCENT ] [ WITH TIES ]
top_before_distinct: boolWhether the top was located before ALL/DISTINCT
projection: Vec<SelectItem>projection expressions
into: Option<SelectInto>INTO
from: Vec<TableWithJoins>FROM
lateral_views: Vec<LateralView>LATERAL VIEWs
prewhere: Option<Expr>ClickHouse syntax: PREWHERE a = 1 WHERE b = 2,
and it can be used together with WHERE selection.
selection: Option<Expr>WHERE
group_by: GroupByExprGROUP BY
cluster_by: Vec<Expr>CLUSTER BY (Hive)
distribute_by: Vec<Expr>DISTRIBUTE BY (Hive)
sort_by: Vec<Expr>SORT BY (Hive)
having: Option<Expr>HAVING
named_window: Vec<NamedWindowDefinition>WINDOW AS
qualify: Option<Expr>QUALIFY (Snowflake)
window_before_qualify: boolThe positioning of QUALIFY and WINDOW clauses differ between dialects. e.g. BigQuery requires that WINDOW comes after QUALIFY, while DUCKDB accepts WINDOW before QUALIFY. We accept either positioning and flag the accepted variant.
value_table_mode: Option<ValueTableMode>BigQuery syntax: SELECT AS VALUE | SELECT AS STRUCT
connect_by: Option<ConnectBy>STARTING WITH .. CONNECT BY
Trait Implementations§
Source§impl Ord for Select
impl Ord for Select
Source§impl PartialOrd for Select
impl PartialOrd for Select
Source§impl VisitMut for Select
impl VisitMut for Select
fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
impl Eq for Select
impl StructuralPartialEq for Select
Auto Trait Implementations§
impl Freeze for Select
impl RefUnwindSafe for Select
impl Send for Select
impl Sync for Select
impl Unpin for Select
impl UnwindSafe for Select
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more