public class PlsqlVariableNamespace extends Object implements INamespace
PL/SQL blocks (<
| Constructor and Description |
|---|
PlsqlVariableNamespace(String blockLabel)
Create a new PL/SQL variable namespace for a labeled block.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(String paramName)
Add a procedure/function parameter to this namespace.
|
void |
addVariable(TVarDeclStmt varDecl)
Add a variable declaration to this namespace.
|
Map<String,ColumnSource> |
getAllColumnSources()
Get all column sources exposed by this namespace.
|
List<TTable> |
getAllFinalTables()
Get all final physical tables this namespace depends on.
|
String |
getBlockLabel()
Get the block label.
|
String |
getDisplayName()
Get a display name for this namespace (for debugging/error messages)
|
TTable |
getFinalTable()
Get the final physical table this namespace represents.
|
Object |
getNode()
Get the associated AST node (TTable, TSelectSqlStatement, etc.)
|
Map<String,TVarDeclStmt> |
getVariables()
Get all variable declarations in this block.
|
ColumnLevel |
hasColumn(String columnName)
Check if a column exists in this namespace.
|
boolean |
hasParameter(String name)
Check if a name is a parameter.
|
boolean |
hasVariable(String variableName)
Check if a variable with the given name exists in this block.
|
boolean |
isValidated()
Check if this namespace is validated/resolved.
|
ColumnSource |
resolveColumn(String columnName)
Resolve a column name to its source.
|
String |
toString() |
void |
validate()
Validate/resolve this namespace.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddInferredColumn, getInferredColumns, getSelectStatement, getSourceTable, getStarColumn, hasStarColumn, resolveColumnPath, supportsDynamicInferencepublic PlsqlVariableNamespace(String blockLabel)
blockLabel - The block label (e.g., "main" from <public void addVariable(TVarDeclStmt varDecl)
varDecl - The variable declaration statementpublic void addParameter(String paramName)
paramName - The parameter name (as String)public boolean hasVariable(String variableName)
variableName - The variable name to checkpublic String getDisplayName()
INamespacegetDisplayName in interface INamespacepublic boolean hasParameter(String name)
name - The name to checkpublic ColumnLevel hasColumn(String columnName)
INamespacehasColumn in interface INamespacecolumnName - Column name to checkpublic ColumnSource resolveColumn(String columnName)
INamespaceresolveColumn in interface INamespacecolumnName - Column name to resolvepublic Map<String,ColumnSource> getAllColumnSources()
INamespacegetAllColumnSources in interface INamespacepublic TTable getFinalTable()
INamespacegetFinalTable in interface INamespacepublic List<TTable> getAllFinalTables()
INamespacegetAllFinalTables in interface INamespacepublic boolean isValidated()
INamespaceisValidated in interface INamespacepublic void validate()
INamespacevalidate in interface INamespacepublic Object getNode()
INamespacegetNode in interface INamespacepublic String getBlockLabel()
public Map<String,TVarDeclStmt> getVariables()