public class TableNamespace extends AbstractNamespace
columnSources, columnSourcesWithRefs, guessColumnStrategy, nameMatcher, node, referenceTraceabilityEnabled, validated| Constructor and Description |
|---|
TableNamespace(TTable table) |
TableNamespace(TTable table,
INameMatcher nameMatcher) |
TableNamespace(TTable table,
INameMatcher nameMatcher,
TSQLEnv sqlEnv) |
TableNamespace(TTable table,
INameMatcher nameMatcher,
TSQLEnv sqlEnv,
EDbVendor vendor)
Create a TableNamespace with full qualified name resolution support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addUsingColumn(String columnName)
Add a USING clause column to this table's namespace.
|
protected void |
doValidate()
Subclasses override this to perform actual validation logic.
|
String |
getDisplayName()
Get a display name for this namespace (for debugging/error messages)
|
TTable |
getFinalTable()
Get the final physical table this namespace represents.
|
QualifiedName |
getQualifiedName()
Get the fully qualified name of this table.
|
QualifiedNameResolver |
getQualifiedNameResolver()
Get the qualified name resolver.
|
TSQLTable |
getResolvedTable()
Get the resolved TSQLTable from SQLEnv.
|
TTable |
getSourceTable()
Get the TTable that this namespace is associated with.
|
TSQLEnv |
getSqlEnv()
Get the TSQLEnv used for metadata lookup.
|
TTable |
getTable() |
EDbVendor |
getVendor()
Get the database vendor.
|
ColumnLevel |
hasColumn(String columnName)
Check if a column exists in this namespace.
|
boolean |
hasMetadata()
Returns true if this namespace has actual metadata (from DDL or SQLEnv).
|
ColumnSource |
resolveColumn(String columnName)
Resolve a column name to its source.
|
void |
setSqlEnv(TSQLEnv sqlEnv)
Set the TSQLEnv for metadata lookup.
|
void |
setVendor(EDbVendor vendor)
Set the database vendor.
|
String |
toString() |
addColumnSource, addColumnSource, enableReferenceTraceability, ensureValidated, getAllColumnSources, getAllFinalTables, getAllUniqueColumns, getColumnReferences, getColumnSourceWithReferences, getGuessColumnStrategy, getNameMatcher, getNode, isReferenceTraceabilityEnabled, isValidated, setGuessColumnStrategy, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddInferredColumn, getInferredColumns, getSelectStatement, getStarColumn, hasStarColumn, resolveColumnPath, supportsDynamicInferencepublic TableNamespace(TTable table, INameMatcher nameMatcher)
public TableNamespace(TTable table, INameMatcher nameMatcher, TSQLEnv sqlEnv)
public TableNamespace(TTable table, INameMatcher nameMatcher, TSQLEnv sqlEnv, EDbVendor vendor)
table - The table AST nodenameMatcher - The name matcher for case sensitivitysqlEnv - The SQL environment for metadata lookupvendor - The database vendorpublic TableNamespace(TTable table)
public void setSqlEnv(TSQLEnv sqlEnv)
sqlEnv - the SQL environment containing table metadatapublic TSQLEnv getSqlEnv()
public void setVendor(EDbVendor vendor)
vendor - the database vendorpublic EDbVendor getVendor()
public QualifiedNameResolver getQualifiedNameResolver()
public QualifiedName getQualifiedName()
The qualified name is computed by applying defaults from TSQLEnv to the table's partial name.
public TSQLTable getResolvedTable()
public String getDisplayName()
INamespacepublic TTable getFinalTable()
INamespacepublic TTable getSourceTable()
INamespaceprotected void doValidate()
AbstractNamespacedoValidate in class AbstractNamespacepublic ColumnLevel hasColumn(String columnName)
INamespacehasColumn in interface INamespacehasColumn in class AbstractNamespacecolumnName - Column name to checkpublic ColumnSource resolveColumn(String columnName)
INamespaceresolveColumn in interface INamespaceresolveColumn in class AbstractNamespacecolumnName - Column name to resolvepublic boolean hasMetadata()
public void addUsingColumn(String columnName)
columnName - the name of the USING columnpublic String toString()
toString in class AbstractNamespace