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 Selectwhere
Atomic<*mut ()>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
OnceLock<Index>: RefUnwindSafe,
Atomic<u8>: RefUnwindSafe,
impl Send for Select
impl Sync for Select
impl Unpin for Select
impl UnsafeUnpin for Selectwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Expression>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Select is !null: UnsafeUnpin,
PhantomData<Select>: UnsafeUnpin,
PhantomData<JoinClause>: UnsafeUnpin,
*const Expression is !null: UnsafeUnpin,
PhantomData<CaseWhen>: UnsafeUnpin,
*const WindowSpecification is !null: UnsafeUnpin,
PhantomData<WindowSpecification>: UnsafeUnpin,
&'static [u8]: UnsafeUnpin,
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const ArcInner<Repr<Object>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Repr<Object>>>: UnsafeUnpin,
*const Query is !null: UnsafeUnpin,
PhantomData<Query>: UnsafeUnpin,
PhantomData<OrderByItem>: UnsafeUnpin,
PhantomData<Cte>: UnsafeUnpin,
PhantomData<WindowDefinition>: UnsafeUnpin,
impl UnwindSafe for Selectwhere
RawVecInner: UnwindSafe,
BoxRaw<Expression>: UnwindSafe,
BoxRaw<Select>: UnwindSafe,
BoxRaw<WindowSpecification>: UnwindSafe,
&'static [u8]: UnwindSafe,
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
Arc<Repr<Object>>: UnwindSafe,
BoxRaw<Query>: UnwindSafe,
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