public final class BindingTraceRegistry extends Object
BindingTraces for one resolver run.
Owned by TSQLResolver2 when
TSQLResolverConfig.captureBindingTrace is enabled; null
otherwise (zero overhead on the default path). Not thread-safe — a resolver
instance is single-threaded and single-use, and so is its registry.
The resolver is iterative (up to maxIterations passes); a
re-resolution of the same reference overwrites its earlier trace, so the
registry ends up describing the FINAL pass — exactly what the P3 proof
consumes.
Consumers must treat a missing trace as unprovable
(trace == null || !trace.complete ⇒ refuse); never assume presence.
| Constructor and Description |
|---|
BindingTraceRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Reset for a fresh resolver run (traces describe exactly one run).
|
void |
invalidate(TObjectName reference)
Drop a reference's trace (⇒ unprovable).
|
void |
invalidateIfInconsistent(TObjectName reference)
Consistency invalidation for post-resolution correction passes (QUALIFY /
USING / subquery-alias / MERGE restores): those handlers may change or
clear
sourceTable AFTER the trace was captured. |
void |
register(BindingTrace trace)
Record (or overwrite with) the latest trace for a reference.
|
int |
size() |
BindingTrace |
traceFor(TObjectName reference)
The final-pass trace for a reference, or
null (⇒ unprovable). |
public BindingTraceRegistry()
public void register(BindingTrace trace)
public void invalidate(TObjectName reference)
public void invalidateIfInconsistent(TObjectName reference)
sourceTable AFTER the trace was captured. If a complete
scope trace's table definition no longer matches the reference's current
sourceTable, the trace is stale — drop it (fail-closed). Non-table
definitions (CTE, derived table) cannot be cross-checked this way and are
left to the overwrite policy.public void clear()
public BindingTrace traceFor(TObjectName reference)
null (⇒ unprovable).public int size()