pub struct NestedQuery {
pub source: String,
pub alias: String,
pub filter: Expr,
pub order: Option<OrderClause>,
pub limit: Option<Expr>,
pub offset: Option<Expr>,
pub offset_before_limit: bool,
pub fields: Vec<ProjectionField>,
}Expand description
Language-lab slice: a nested sub-query projection value, e.g.
orders: Order as o filter o.user_id = u.id { o.total, o.product_id }.
The filter must be a single equi-correlation predicate between the child
alias and the outer alias (validated by the planner, which knows the
outer alias); the parser stores it as a plain Expr.
Fields§
§source: String§alias: String§filter: Expr§order: Option<OrderClause>Per-parent ordering, applied to each parent’s child bucket.
limit: Option<Expr>Per-parent truncation, applied after ordering.
offset: Option<Expr>§offset_before_limit: boolTrue when the source text wrote offset before limit. The plan
cache refuses to cache that form: its source literal order is
[offset, limit] while the substitution walk visits limit first.
fields: Vec<ProjectionField>Trait Implementations§
Source§impl Clone for NestedQuery
impl Clone for NestedQuery
Source§fn clone(&self) -> NestedQuery
fn clone(&self) -> NestedQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NestedQuery
impl Debug for NestedQuery
Source§impl PartialEq for NestedQuery
impl PartialEq for NestedQuery
impl StructuralPartialEq for NestedQuery
Auto Trait Implementations§
impl Freeze for NestedQuery
impl RefUnwindSafe for NestedQuery
impl Send for NestedQuery
impl Sync for NestedQuery
impl Unpin for NestedQuery
impl UnsafeUnpin for NestedQuery
impl UnwindSafe for NestedQuery
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