| Package | Description |
|---|---|
| gudusoft.gsqlparser.resolver2 | |
| gudusoft.gsqlparser.resolver2.model | |
| gudusoft.gsqlparser.resolver2.result | |
| gudusoft.gsqlparser.resolver2.scope |
| Modifier and Type | Method and Description |
|---|---|
IScope |
ScopeBuildResult.getScopeForColumn(TObjectName column)
Get the scope for a specific column reference
|
| Modifier and Type | Method and Description |
|---|---|
Map<TObjectName,IScope> |
ScopeBuildResult.getColumnToScopeMap() |
| Modifier and Type | Method and Description |
|---|---|
List<INamespace> |
NameResolver.findNamespacesWithColumn(String columnName,
IScope scope)
Find all namespaces that contain a given column.
|
ResolutionResult |
NameResolver.resolve(TObjectName objName,
IScope scope)
Resolve a column reference (TObjectName) within a given scope.
|
| Constructor and Description |
|---|
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable) |
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable,
Map<TObjectName,TTable> usingColumnToLeftTable) |
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable,
Map<TObjectName,TTable> usingColumnToLeftTable,
Map<TTable,INamespace> tableToNamespaceMap) |
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable,
Map<TObjectName,TTable> usingColumnToLeftTable,
Map<TTable,INamespace> tableToNamespaceMap,
Set<TTable> ctasTargetTables) |
| Modifier and Type | Method and Description |
|---|---|
static FromScopeIndex |
FromScopeIndex.fromScope(IScope scope)
Creates an index from a scope, extracting the FromScope if needed.
|
| Modifier and Type | Method and Description |
|---|---|
IScope |
ResolutionResultImpl.getScope(TCustomSqlStatement stmt) |
IScope |
IResolutionResult.getScope(TCustomSqlStatement stmt)
获取指定语句的 Scope
仅供高级用户使用,一般不需要直接访问 Scope
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractScope
Abstract base class for all scopes.
|
class |
CTEScope
Scope for Common Table Expressions (WITH clause).
|
class |
DeleteScope
Scope for DELETE statement.
|
class |
EmptyScope
Empty scope - terminates the scope chain.
|
class |
FromScope
Scope for FROM clause.
|
class |
GlobalScope
Global scope - contains session-level objects and metadata.
|
class |
GroupByScope
Scope for GROUP BY clause.
|
class |
HavingScope
Scope for HAVING clause.
|
class |
JoinScope
Scope for JOIN operations.
|
class |
ListBasedScope
Base class for scopes that manage a list of child namespaces.
|
class |
MergeScope
Scope for MERGE statement.
|
class |
OraclePackageScope
Scope for Oracle PL/SQL package bodies.
|
class |
OrderByScope
Scope for ORDER BY clause.
|
class |
PlsqlBlockScope
Scope for PL/SQL blocks (Oracle, PostgreSQL PL/pgSQL).
|
class |
SelectScope
Scope for SELECT statement.
|
class |
UpdateScope
Scope for UPDATE statement.
|
| Modifier and Type | Field and Description |
|---|---|
protected IScope |
AbstractScope.parent
Parent scope (never null - root has EmptyScope parent)
|
IScope |
ResolvedImpl.Match.scope |
| Modifier and Type | Method and Description |
|---|---|
IScope |
OrderByScope.getFromScope()
Get the FROM scope.
|
IScope |
GroupByScope.getFromScope()
Get the FROM scope.
|
IScope |
HavingScope.getGroupByScope()
Get the GROUP BY scope.
|
IScope |
IScope.getParent()
Get the parent scope.
|
IScope |
EmptyScope.getParent() |
IScope |
AbstractScope.getParent() |
IScope |
HavingScope.getSelectScope()
Get the SELECT scope.
|
IScope |
OrderByScope.getSelectScope()
Get the SELECT scope.
|
IScope |
DeleteScope.getWhereScope() |
IScope |
SelectScope.getWhereScope() |
IScope |
UpdateScope.getWhereScope() |
| Modifier and Type | Method and Description |
|---|---|
void |
IResolved.found(INamespace namespace,
boolean nullable,
IScope scope,
ResolvePath path,
List<String> remainingNames)
Called when a namespace is found that matches the name being resolved.
|
void |
ResolvedImpl.found(INamespace namespace,
boolean nullable,
IScope scope,
ResolvePath path,
List<String> remainingNames) |
boolean |
IScope.isWithin(IScope ancestorScope)
Check if this scope is within (nested inside) another scope.
|
boolean |
EmptyScope.isWithin(IScope ancestorScope) |
boolean |
AbstractScope.isWithin(IScope ancestorScope)
Default implementation: check ancestry
|
void |
OrderByScope.setFromScope(IScope fromScope)
Set the FROM scope for column resolution.
|
void |
GroupByScope.setFromScope(IScope fromScope)
Set the FROM scope for column resolution.
|
void |
HavingScope.setGroupByScope(IScope groupByScope)
Set the GROUP BY scope for column resolution.
|
void |
HavingScope.setSelectScope(IScope selectScope)
Set the SELECT scope for alias resolution.
|
void |
OrderByScope.setSelectScope(IScope selectScope)
Set the SELECT scope for alias resolution.
|
void |
DeleteScope.setWhereScope(IScope whereScope) |
void |
SelectScope.setWhereScope(IScope whereScope) |
void |
UpdateScope.setWhereScope(IScope whereScope) |
| Constructor and Description |
|---|
AbstractScope(IScope parent,
TParseTreeNode node,
ScopeType scopeType) |
CTEScope(IScope parent,
TCTEList cteList) |
DeleteScope(IScope parent,
TDeleteSqlStatement stmt) |
FromScope(IScope parent,
TParseTreeNode node) |
GroupByScope(IScope parent,
TGroupBy groupByNode) |
HavingScope(IScope parent,
TExpression havingCondition) |
JoinScope(IScope parent,
TJoinExpr joinExpr) |
ListBasedScope(IScope parent,
TParseTreeNode node,
ScopeType scopeType) |
Match(INamespace namespace,
boolean nullable,
IScope scope,
ResolvePath path,
List<String> remainingNames) |
MergeScope(IScope parent,
TMergeSqlStatement stmt) |
OraclePackageScope(IScope parent,
TPlsqlCreatePackage packageStmt,
OraclePackageNamespace packageNamespace)
Create a new Oracle package scope.
|
OrderByScope(IScope parent,
TOrderBy orderByNode) |
PlsqlBlockScope(IScope parent,
TBlockSqlNode blockNode)
Create a new PL/SQL block scope for a labeled block.
|
PlsqlBlockScope(IScope parent,
TCustomSqlStatement stmt,
String procedureName)
Create a new PL/SQL block scope for a stored procedure or function.
|
SelectScope(IScope parent,
TParseTreeNode node) |
UpdateScope(IScope parent,
TUpdateSqlStatement stmt) |