public class ResolutionContext extends Object
| Constructor and Description |
|---|
ResolutionContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all data (for reuse or testing)
|
void |
enableBindingTrace()
Enable per-
TObjectName binding-trace recording. |
Set<TTable> |
getAllReferencedTables()
Get all tables that have been referenced
|
List<TObjectName> |
getAmbiguousColumns()
Get all ambiguous columns
|
ResolutionResult |
getColumnResolutionResult(TObjectName objName)
Get the recorded resolution for a specific
TObjectName reference. |
List<TObjectName> |
getColumnsByName(String columnName)
Find all column references with a given name (for conflict detection).
|
BindingSkipReason |
getColumnSkipReason(TObjectName objName)
Get the skip-reason recorded for a specific
TObjectName reference. |
List<TObjectName> |
getExactMatches()
Get all exactly matched columns
|
List<TObjectName> |
getReferencesTo(TTable table)
Get all column references to a specific table.
|
List<TObjectName> |
getReferencesTo(TTable table,
String columnName)
Get all column references to a specific table.column.
|
ResolutionResult |
getResolution(TObjectName objName)
Get resolution result for a specific TObjectName
|
ResolutionStatistics |
getStatistics()
Get resolution statistics
|
int |
getTableReferenceCount(TTable table)
Get reference count for a specific table
|
List<TObjectName> |
getUnresolvedColumns()
Get all unresolved columns
|
boolean |
isBindingTraceEnabled() |
void |
recordColumnSkipReason(TObjectName objName,
BindingSkipReason reason)
Record an explicit binding-skip reason for a reference.
|
void |
registerResolution(TObjectName objName,
ResolutionResult result)
Register a resolution result.
|
public ResolutionContext()
public void registerResolution(TObjectName objName, ResolutionResult result)
public List<TObjectName> getReferencesTo(TTable table)
table - Target tablepublic List<TObjectName> getReferencesTo(TTable table, String columnName)
table - Target tablecolumnName - Target column namepublic List<TObjectName> getColumnsByName(String columnName)
public List<TObjectName> getExactMatches()
public List<TObjectName> getAmbiguousColumns()
public List<TObjectName> getUnresolvedColumns()
public int getTableReferenceCount(TTable table)
public Set<TTable> getAllReferencedTables()
public ResolutionStatistics getStatistics()
public ResolutionResult getResolution(TObjectName objName)
public void clear()
public void enableBindingTrace()
TObjectName binding-trace recording.
Allocates the identity-keyed trace and skip-reason maps on first call;
subsequent calls are no-ops. TSQLResolver2.resolve() flips this
on at the start of resolution when either emitBindingDiagnostics
or bindingIncludeSuccessfulReferences is set.
public boolean isBindingTraceEnabled()
true once enableBindingTrace() has been called
for this context.public ResolutionResult getColumnResolutionResult(TObjectName objName)
TObjectName reference.
Identity-keyed (two references with equal toString are kept
separate). Returns null when no resolution has been recorded for
this reference, including when the trace is disabled.
public BindingSkipReason getColumnSkipReason(TObjectName objName)
TObjectName reference.public void recordColumnSkipReason(TObjectName objName, BindingSkipReason reason)