Skip to main content

Module resolver

Module resolver 

Source
Expand description

Walk a parsed statement and produce its Scope.

Resolution is one pass: every FROM / JOIN reference adds a binding under both its alias (if present) and its bare table name. Subsequent lookups by either form resolve to the same row.

Functions§

resolve
Resolve every statement in stmts. Returns one Scope per statement, in matching order, so callers can index by statement position.
resolve_with_source
Resolve as above, but use source to populate Scope.cte_columns with the projection column names declared by each CTE body’s outer SELECT. Best-effort – subqueries / function calls / * show up as empty Vecs.