pub struct NestedQuery {
pub source: String,
pub alias: String,
pub via_link: Option<ViaLink>,
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§via_link: Option<ViaLink>Set when this nested query was written as a block link traversal
(orders: u.orders { ... }) rather than an explicit correlated scan.
When set, source is a placeholder and filter holds only the
residual child conditions; the correlation is resolved from the
persistent catalog at execution time.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more