pub struct Query {
pub body: QueryBody,
pub order_by: Slice,
pub order_by_all: bool,
pub limit: ExprRef,
pub limit_percent: bool,
pub offset: ExprRef,
}Expand description
A query: a body, plus the modifiers that apply to whatever the body produced.
The split is the grammar’s, not an invention. SelectStatementInternal <- WithClause? SelectSetOpChain ResultModifiers? puts ORDER BY and LIMIT outside the set operator chain,
which is the only place they can go and be right: a UNION b ORDER BY x sorts the union and not
the second half of it. Hanging them off Select instead would have made that unrepresentable.
Fields§
§body: QueryBodyWhat produces the rows.
order_by: SliceThe ORDER BY list, as a run of OrderItem.
order_by_all: boolWhether the clause was ORDER BY ALL.
limit: ExprRefThe LIMIT expression, or NONE.
limit_percent: boolWhether the limit was a percentage rather than a row count.
offset: ExprRefThe OFFSET expression, or NONE.
Implementations§
Trait Implementations§
impl Copy for Query
impl Eq for Query
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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