pub struct NestedProjection {
pub name: String,
pub table: String,
pub alias: String,
pub parent_alias: String,
pub child_key: String,
pub parent_key: String,
pub residual: Option<Expr>,
pub order: Vec<(String, bool)>,
pub limit: Option<Expr>,
pub offset: Option<Expr>,
pub offset_before_limit: bool,
pub fields: Vec<NestedField>,
}Expand description
The resolved form of one nested sub-query projection field. Correlation
columns are pre-split by the planner: at the top level parent_key is
the qualified parent column name (u.id) as produced by an AliasScan;
for a nested-in-nested field it is the bare column name of the enclosing
child table. child_key is always the bare child column name.
Fields§
§name: StringOutput column name (the projection field’s alias).
table: String§alias: StringThe child alias from the source text, kept for EXPLAIN and errors.
parent_alias: StringThe enclosing scope’s alias, kept for EXPLAIN (the executor
correlates through parent_key alone).
child_key: String§parent_key: String§residual: Option<Expr>Residual filter conditions beyond the correlation predicate, rewritten by the planner to reference bare child columns.
order: Vec<(String, bool)>Per-parent ordering: (bare child column, descending) keys applied
to each parent’s child bucket before truncation.
limit: Option<Expr>Per-parent truncation bounds, applied after ordering. Must evaluate to non-negative integer literals (like top-level limit/offset).
offset: Option<Expr>§offset_before_limit: boolSource wrote offset before limit; the plan cache refuses this
form (see plan_cache::nested_projection_defeats_cache).
fields: Vec<NestedField>Implementations§
Source§impl NestedProjection
impl NestedProjection
Sourcepub fn visit_tables(&self, visit: &mut dyn FnMut(&str))
pub fn visit_tables(&self, visit: &mut dyn FnMut(&str))
Visit this projection’s child table and every deeper nested child table. Used for dirty-view escalation and auto-refresh.
Trait Implementations§
Source§impl Clone for NestedProjection
impl Clone for NestedProjection
Source§fn clone(&self) -> NestedProjection
fn clone(&self) -> NestedProjection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more