Struct sql::plan::query::QueryContext[][src]

pub struct QueryContext<'a> {
    pub scx: &'a StatementContext<'a>,
    pub lifetime: QueryLifetime<'a>,
    pub outer_scopes: Vec<Scope>,
    pub outer_relation_types: Vec<RelationType>,
    pub ctes: HashMap<LocalId, CteDesc>,
    pub ids: HashSet<GlobalId>,
    pub recursion_guard: RecursionGuard,
}
Expand description

The state required when planning a Query.

Fields

scx: &'a StatementContext<'a>

The context for the containing Statement.

lifetime: QueryLifetime<'a>

The lifetime that the planned query will have.

outer_scopes: Vec<Scope>

The scopes of the outer relation expression.

outer_relation_types: Vec<RelationType>

The type of the outer relation expressions.

ctes: HashMap<LocalId, CteDesc>

CTEs for this query, mapping their assigned LocalIds to their definition.

ids: HashSet<GlobalId>

The GlobalIds of the items the Query is dependent upon.

recursion_guard: RecursionGuard

Implementations

Generate a new QueryContext appropriate to be used in subqueries of self.

Derives a QueryContext for a scope that contains no columns.

Resolves object to a table expr, i.e. creating a Get or inlining a CTE.

Trait Implementations

Extracts a reference to the recursion guard embedded within the type.

Checks whether it is safe to recur and calls f if so. Read more

Like CheckedRecursion::checked_recur, but operates on a mutable reference to Self. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more