pub struct Select {
pub columns: Vec<Expression>,
pub from: Option<TableSource>,
pub joins: Vec<JoinClause>,
pub where_clause: Option<Expression>,
pub group_by: Vec<Expression>,
pub having: Option<Expression>,
pub order_by: Vec<OrderByItem>,
pub limit: Option<Expression>,
pub offset: Option<Expression>,
pub distinct: bool,
pub ctes: Vec<Cte>,
pub windows: Vec<WindowDefinition>,
}Expand description
A SELECT statement.
The PHP class is immutable and copies itself with with(); here the
fields are public, so a changed copy is struct update syntax
(Select { where_clause: Some(condition), ..select }).
PHP: Utopia\Query\AST\Statement\Select (columns, from, joins,
where, groupBy, having, orderBy, limit, offset, distinct,
ctes, windows), and Select::with().
Fields§
§columns: Vec<Expression>The selected expressions.
from: Option<TableSource>The FROM source.
joins: Vec<JoinClause>The joins.
where_clause: Option<Expression>The WHERE condition.
PHP: $where.
group_by: Vec<Expression>The GROUP BY expressions.
having: Option<Expression>The HAVING condition.
order_by: Vec<OrderByItem>The ORDER BY items.
limit: Option<Expression>The LIMIT.
offset: Option<Expression>The OFFSET.
distinct: boolSELECT DISTINCT.
ctes: Vec<Cte>The WITH clauses.
windows: Vec<WindowDefinition>The WINDOW definitions.
Trait Implementations§
impl StructuralPartialEq for Select
Auto Trait Implementations§
impl !Freeze for Select
impl Forget for Select
impl Move for Select
impl RefUnwindSafe for Select
impl Send for Select
impl Sync for Select
impl Unpin for Select
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more