public final class DynamicSqlSite extends Object
DataFlowAnalyzer, together with whether the analyzer
could statically resolve it. This is diagnostic / catalog-completeness information only; it
is not consumed by lineage computation.
DynamicSqlSite.Status is driven by what the analyzer actually did, so it never overstates:
RESOLVED — the argument was a compile-time string literal that folded and parsed;
lineage was attempted on fully-known text.PARSE_ERROR — a folded literal argument whose parse() failed.UNRESOLVED — the site's SQL is not fully known: a runtime variable or expression
argument (even when GSP partially folds it, leaving an unresolved parameter in the text), or
text GSP did not fold at all. Lineage is partial or absent. The getReason() string
distinguishes these cases.Status corresponds 1:1 to the internal v2 IR
gudusoft.gsqlparser.ir.builder.common.DynamicSqlExtraction.Status
(RESOLVED / AMBIGUOUS / PARSE_ERROR); UNRESOLVED is the public spelling of
AMBIGUOUS.
Positions follow the GSP convention: 1-based, end-exclusive, tagged with the per-statement
file hash (same shape as ErrorInfo).
| Modifier and Type | Class and Description |
|---|---|
static class |
DynamicSqlSite.Kind
The syntactic form of the dynamic-exec site.
|
static class |
DynamicSqlSite.Status
Whether the analyzer resolved the dynamic SQL at this site.
|
| Constructor and Description |
|---|
DynamicSqlSite(DynamicSqlSite.Kind kind,
DynamicSqlSite.Status status,
String reason,
Pair3<Long,Long,String> startPosition,
Pair3<Long,Long,String> endPosition,
int resolvedRelationshipCount,
int partialRelationshipCount) |
| Modifier and Type | Method and Description |
|---|---|
Pair3<Long,Long,String> |
getEndPosition() |
DynamicSqlSite.Kind |
getKind() |
int |
getPartialRelationshipCount()
Number of lineage edges this site produced into an unresolved target — a T-SQL variable or
placeholder (e.g.
|
String |
getReason()
Human-readable explanation;
null for DynamicSqlSite.Status.RESOLVED. |
int |
getResolvedRelationshipCount()
Number of lineage edges this site produced into a real target column (a resolved base-table
column, not a T-SQL variable or placeholder).
|
Pair3<Long,Long,String> |
getStartPosition() |
DynamicSqlSite.Status |
getStatus() |
boolean |
producedLineage()
True iff this site produced at least one resolved lineage edge (into a real target column).
|
public DynamicSqlSite(DynamicSqlSite.Kind kind, DynamicSqlSite.Status status, String reason, Pair3<Long,Long,String> startPosition, Pair3<Long,Long,String> endPosition, int resolvedRelationshipCount, int partialRelationshipCount)
public DynamicSqlSite.Kind getKind()
public DynamicSqlSite.Status getStatus()
public String getReason()
null for DynamicSqlSite.Status.RESOLVED.public Pair3<Long,Long,String> getStartPosition()
public Pair3<Long,Long,String> getEndPosition()
public int getResolvedRelationshipCount()
> 0 iff the site's dynamic SQL yielded usable lineage.public int getPartialRelationshipCount()
EXEC sp_executesql @sql folded to INSERT INTO @t SELECT ...). These
are partial: a source is known but the target object is not.public boolean producedLineage()