pub struct SelectStatement {Show 15 fields
pub ctes: Vec<Cte>,
pub distinct: bool,
pub top: Option<Box<Expr>>,
pub columns: Vec<SelectItem>,
pub from: Option<FromClause>,
pub joins: Vec<JoinClause>,
pub where_clause: Option<Expr>,
pub group_by: Vec<Expr>,
pub having: Option<Expr>,
pub order_by: Vec<OrderByItem>,
pub limit: Option<Expr>,
pub offset: Option<Expr>,
pub fetch_first: Option<Expr>,
pub qualify: Option<Expr>,
pub window_definitions: Vec<WindowDefinition>,
}Expand description
A SELECT statement, including CTEs.
Aligned with sqlglot’s Select expression which wraps With, From,
Where, Group, Having, Order, Limit, Offset, Window.
Fields§
§ctes: Vec<Cte>Common Table Expressions (WITH clause)
distinct: bool§top: Option<Box<Expr>>TOP N (TSQL-style)
columns: Vec<SelectItem>§from: Option<FromClause>§joins: Vec<JoinClause>§where_clause: Option<Expr>§group_by: Vec<Expr>§having: Option<Expr>§order_by: Vec<OrderByItem>§limit: Option<Expr>§offset: Option<Expr>§fetch_first: Option<Expr>Oracle-style FETCH FIRST n ROWS ONLY
qualify: Option<Expr>QUALIFY clause (BigQuery, Snowflake)
window_definitions: Vec<WindowDefinition>Named WINDOW definitions
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 · 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§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§
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