Class SelectScope
Object
gudusoft.gsqlparser.resolver2.scope.AbstractScope
gudusoft.gsqlparser.resolver2.scope.SelectScope
- All Implemented Interfaces:
IScope
Scope for SELECT statement.
This is typically the root scope for a query.
Contains:
- FROM clause scope (child)
- WHERE clause scope (child)
- SELECT list namespace (for ORDER BY to reference)
-
Field Summary
Fields inherited from class gudusoft.gsqlparser.resolver2.scope.AbstractScope
node, parent, scopeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDefault implementation: delegate to parentvoidresolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved) Resolve a name within this SELECT scope.resolveTable(String tableName) Default implementation: delegate to parentvoidsetFromScope(FromScope fromScope) voidsetSelectListNamespace(INamespace namespace) voidsetWhereScope(IScope whereScope) toString()Methods inherited from class gudusoft.gsqlparser.resolver2.scope.AbstractScope
addChild, fullyQualify, getChildren, getNode, getParent, getScopeType, isWithin
-
Constructor Details
-
SelectScope
-
-
Method Details
-
setFromScope
-
getFromScope
-
setWhereScope
-
getWhereScope
-
setSelectListNamespace
-
getSelectListNamespace
-
resolveTable
Description copied from class:AbstractScopeDefault implementation: delegate to parent- Specified by:
resolveTablein interfaceIScope- Overrides:
resolveTablein classAbstractScope- Parameters:
tableName- Table name or alias- Returns:
- Namespace if found, null otherwise
-
getVisibleNamespaces
Description copied from class:AbstractScopeDefault implementation: delegate to parent- Specified by:
getVisibleNamespacesin interfaceIScope- Overrides:
getVisibleNamespacesin classAbstractScope- Returns:
- List of visible namespaces
-
resolve
Resolve a name within this SELECT scope. Resolution strategy: 1. For qualified names (t.col): find table t in FROM scope, then resolve col 2. For unqualified names (col): search all visible namespaces in FROM scope 3. Delegate to parent for names not found locally- Specified by:
resolvein interfaceIScope- Overrides:
resolvein classAbstractScope- Parameters:
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 matches
-
toString
- Overrides:
toStringin classAbstractScope
-