public interface IScope
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(INamespace namespace,
String alias,
boolean nullable)
Add a child namespace to this scope.
|
QualifiedName |
fullyQualify(String name)
Fully qualify a name based on this scope.
|
List<ScopeChild> |
getChildren()
Get all child namespaces in this scope.
|
TParseTreeNode |
getNode()
Get the associated AST node
|
IScope |
getParent()
Get the parent scope.
|
ScopeType |
getScopeType()
Get the scope type
|
List<INamespace> |
getVisibleNamespaces()
Get all namespaces visible in this scope.
|
boolean |
isWithin(IScope ancestorScope)
Check if this scope is within (nested inside) another scope.
|
void |
resolve(List<String> names,
INameMatcher matcher,
boolean deep,
IResolved resolved)
Resolve a qualified or unqualified name.
|
INamespace |
resolveTable(String tableName)
Resolve a table name or alias to its namespace.
|
IScope getParent()
TParseTreeNode getNode()
ScopeType getScopeType()
void resolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved)
names - Name parts (e.g., ["schema", "table", "column"])matcher - Name matcher for case sensitivity rulesdeep - Whether to recursively resolve into record fieldsresolved - Callback to collect all matchesINamespace resolveTable(String tableName)
tableName - Table name or aliasvoid addChild(INamespace namespace, String alias, boolean nullable)
namespace - The namespace to addalias - The alias for this namespacenullable - Whether this namespace is nullable (e.g., RIGHT side of LEFT JOIN)List<ScopeChild> getChildren()
List<INamespace> getVisibleNamespaces()
QualifiedName fullyQualify(String name)
name - Name to qualify