Expand description
Scope Analysis Module
This module provides scope analysis for SQL queries, enabling detection of correlated subqueries, column references, and scope relationships.
Ported from sqlglot’s optimizer/scope.py
Structs§
- Column
Ref - A column reference found in a scope
- Scope
- Represents a scope in a SQL query
- Source
Info - Information about a source (table or subquery) in a scope
Enums§
- Scope
Type - Type of scope in a SQL query
Functions§
- build_
scope - Build scope tree from an expression
- find_
all_ in_ scope - Find all expressions matching the predicate within this scope.
- find_
in_ scope - Find the first expression matching the predicate within this scope.
- traverse_
scope - Traverse an expression by its “scopes”.
- walk_
in_ scope - Walk within a scope, yielding expressions without crossing scope boundaries.