Class EmptyScope
Object
gudusoft.gsqlparser.resolver2.scope.EmptyScope
- All Implemented Interfaces:
IScope
Empty scope - terminates the scope chain.
This is the parent of GlobalScope, providing base-case behavior.
All resolution methods do nothing or return empty/null.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(INamespace namespace, String alias, boolean nullable) Add a child namespace to this scope.fullyQualify(String name) Fully qualify a name based on this scope.Get all child namespaces in this scope.getNode()Get the associated AST nodeGet the parent scope.Get the scope typeGet all namespaces visible in this scope.booleanCheck if this scope is within (nested inside) another scope.voidresolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved) Resolve a qualified or unqualified name.resolveTable(String tableName) Resolve a table name or alias to its namespace.toString()
-
Field Details
-
INSTANCE
Singleton instance
-
-
Method Details
-
getParent
Description copied from interface:IScopeGet the parent scope. Root scope (GlobalScope) has EmptyScope as parent. -
getNode
Description copied from interface:IScopeGet the associated AST node -
getScopeType
Description copied from interface:IScopeGet the scope type- Specified by:
getScopeTypein interfaceIScope- Returns:
- Scope type enum
-
resolve
Description copied from interface:IScopeResolve a qualified or unqualified name. This is the core method for name resolution. -
resolveTable
Description copied from interface:IScopeResolve a table name or alias to its namespace.- Specified by:
resolveTablein interfaceIScope- Parameters:
tableName- Table name or alias- Returns:
- Namespace if found, null otherwise
-
addChild
Description copied from interface:IScopeAdd a child namespace to this scope. Typically used in FROM clauses to add tables/subqueries. -
getChildren
Description copied from interface:IScopeGet all child namespaces in this scope.- Specified by:
getChildrenin interfaceIScope- Returns:
- List of scope children
-
getVisibleNamespaces
Description copied from interface:IScopeGet all namespaces visible in this scope. Includes children and namespaces from parent scopes.- Specified by:
getVisibleNamespacesin interfaceIScope- Returns:
- List of visible namespaces
-
fullyQualify
Description copied from interface:IScopeFully qualify a name based on this scope. E.g., "col" -> "table.col" if only one table has that column- Specified by:
fullyQualifyin interfaceIScope- Parameters:
name- Name to qualify- Returns:
- Qualified name
-
isWithin
Description copied from interface:IScopeCheck if this scope is within (nested inside) another scope. -
toString
-