public final class RoutineShadow extends Object
RoutineRegistry beside the legacy name-keyed routine registry and
records, per declaration and per lookup, what each found. Enabled by the system property
"gsp.dlineage.routineShadow" naming a file the records are appended to (tab separated); off by default, when the
callers do not evaluate its arguments. Nothing here throws into the analysis, and the typed registry is fed
from the statements themselves, never from the models the legacy registry chose.| Modifier and Type | Class and Description |
|---|---|
static class |
RoutineShadow.State
The shadow's per-analysis state, kept by the analysis's ModelBindingManager and cleared with it.
|
| Modifier and Type | Method and Description |
|---|---|
static Integer |
countAliasOf(TFunctionCall call)
The argument alias a call is looked up with: its argument count where the vendor overloads routines.
|
static void |
declared(ModelBindingManager manager,
String site,
TStoredProcedureSqlStatement stmt,
Procedure legacy)
A routine statement the legacy registry was asked to create a model for, and the model it returned
(a new one, or an existing one it found by name).
|
static void |
declaredFromCall(ModelBindingManager manager,
String site,
TObjectName written,
Object origin,
Integer argumentCount,
CatalogObjectKind wanted,
Procedure legacy)
A routine the legacy registry was asked for by name from a call or an EXEC (
origin is the call or
name node): it returns an existing routine it found by name, or a new one made from origin. |
static void |
definition(ModelBindingManager manager,
TStoredProcedureSqlStatement stmt)
A routine definition found by the script pre-scan, analyzed lazily when first called.
|
static boolean |
enabled() |
static void |
lookedUp(ModelBindingManager manager,
String site,
TCustomSqlStatement at,
TObjectName written,
Integer[] aliases,
CatalogObjectKind wanted,
Procedure legacy)
A callee lookup at a call site inside
at and the routine the legacy lookup settled on (null when
none). |
public static final String PROPERTY
public static boolean enabled()
public static void declared(ModelBindingManager manager, String site, TStoredProcedureSqlStatement stmt, Procedure legacy)
public static void declaredFromCall(ModelBindingManager manager, String site, TObjectName written, Object origin, Integer argumentCount, CatalogObjectKind wanted, Procedure legacy)
origin is the call or
name node): it returns an existing routine it found by name, or a new one made from origin. The
typed registry looks the name up first and declares a routine only when nothing is found.public static void definition(ModelBindingManager manager, TStoredProcedureSqlStatement stmt)
public static Integer countAliasOf(TFunctionCall call)
TABLE(f())).public static void lookedUp(ModelBindingManager manager, String site, TCustomSqlStatement at, TObjectName written, Integer[] aliases, CatalogObjectKind wanted, Procedure legacy)
at and the routine the legacy lookup settled on (null when
none). aliases are the argument aliases the site tries in order (null for a name-only lookup), as the
site's own retries do. The script's pre-scanned definitions are looked up too, as the lazy analysis would.