public class ModelBindingManager extends Object
| Modifier and Type | Field and Description |
|---|---|
Map<String,Long> |
DISPLAY_ID |
Map<Long,String> |
DISPLAY_NAME |
long |
RELATION_ID |
long |
TABLE_COLUMN_ID |
int |
virtualTableIndex |
Map<String,String> |
virtualTableNames |
| Constructor and Description |
|---|
ModelBindingManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPendingPipelinedCallSite(PendingPipelinedCallSite callSite) |
void |
addPipelinedSignature(PipelinedFunctionSignature sig)
Registers a pipelined signature under its function's identity and the identity of its bare name; a signature
built through the deprecated text keys is registered under those.
|
void |
addRelation(Relationship relation) |
void |
appendDblinkTable(String name) |
void |
bindCreateModel(String tableName,
Table tableModel) |
void |
bindCreateModel(TObjectName tableName,
Table tableModel) |
void |
bindCreateModel(TTable table,
Table tableModel) |
void |
bindCursorIndex(TObjectName indexName,
TObjectName cursorName)
Binds a cursor FOR loop's index to the cursor the loop names: one declared in the loop's routine, an enclosing
routine or the package.
|
void |
bindCursorModel(TCursorDeclStmt stmt,
Variable resultSet) |
void |
bindCursorModel(TForStmt stmt,
Variable resultSet) |
void |
bindCursorModel(TLoopStmt stmt,
Variable resultSet) |
void |
bindCursorModel(TMssqlDeclare stmt,
Variable resultSet) |
void |
bindCursorModel(TOpenforStmt stmt,
Variable resultSet) |
void |
bindFunctionResult(RoutineAliasKey key,
Object functionTable)
Adds one of a routine's function results under the routine's name as written.
|
void |
bindInsertModel(Object gspModel,
Object relationModel) |
void |
bindLocalSymbol(LocalSymbolKey key,
Table symbol)
Indexes a local symbol by its key without listing it again (an alias of a model already listed).
|
void |
bindMergeModel(Object gspModel,
Object relationModel) |
void |
bindModel(Object gspModel,
Object relationModel) |
void |
bindOraclePackage(RoutineAliasKey key,
OraclePackage oraclePackageModel) |
void |
bindOraclePackageByName(String oraclePackageName,
OraclePackage oraclePackageModel)
Deprecated.
packages are keyed by their names as written: use
bindOraclePackage(RoutineAliasKey, OraclePackage) |
void |
bindProcedure(RoutineAliasKey key,
Procedure procedureModel)
Binds a routine model under one of its names as written with one alias suffix.
|
void |
bindProcedureByName(String procedureName,
Procedure procedureModel)
Deprecated.
routines are keyed by their names as written: use
bindProcedure(RoutineAliasKey, Procedure) |
void |
bindProcessModel(TParseTreeNode gspModel,
Object relationModel) |
void |
bindTableByName(Object tableName,
Table tableModel)
Canonical physical-table keys share lifecycle/ordering with legacy bindings.
|
void |
bindTableByName(String tableName,
Table tableModel) |
void |
bindTableFunction(Object gspModel,
Object functionTable)
Deprecated.
function results are keyed by the routine's name as written: use
bindFunctionResult(RoutineAliasKey, Object) |
void |
bindUpdateModel(Object gspModel,
Object relationModel) |
void |
bindViewModel(Object gspModel,
Object relationModel) |
void |
cleanTempTable() |
void |
collectDynamicSqlHash(TCustomSqlStatement stmt) |
void |
collectSqlHash(TCustomSqlStatement stmt) |
void |
dropTable(Table table) |
List<Map> |
enterTemporaryTableScope()
Save session/caller bindings while analyzing a separate routine body.
|
PipelinedFunctionSignature |
findPipelinedSignature(List<String> candidates,
int argCount)
Deprecated.
signatures are registered under the identities of their names: use
findPipelinedSignatureByKeys(List, int) |
PipelinedFunctionSignature |
findPipelinedSignatureAny(List<String> candidates)
Deprecated.
signatures are registered under the identities of their names: use
findPipelinedSignatureAnyByKeys(List) |
PipelinedFunctionSignature |
findPipelinedSignatureAnyByKeys(List<?> keys)
The only signature registered under the first of
keys that has exactly one; null when none. |
PipelinedFunctionSignature |
findPipelinedSignatureByKeys(List<?> keys,
int argCount)
The one signature registered under the first of
keys that has any accepting argCount (any count
when negative); null when none, or when that key is ambiguous. |
static ModelBindingManager |
get() |
List<TParseTreeNode> |
getAliases() |
List<TTable> |
getBaseTables() |
Object |
getBoundModel(Object gspModel)
The model bound to
gspModel itself, never one found by its name: a relation such as a LATERAL VIEW
must not take the model of a table that has its name (getModel(java.lang.Object) falls back to the name of a TTable). |
String |
getCollectionElementType(Object collectionKey)
The element type name, as written, of the collection type a key names, or null.
|
Table |
getCreateModel(TTable table) |
Table |
getCreateTable(TTable table) |
List<TCTE> |
getCTEs() |
long |
getCurrentStatementOrdinal() |
List<TParseTreeNode> |
getCursors() |
Set<Table> |
getDropTables() |
Map |
getDynamicSQLMap() |
static String |
getEffectiveDefaultDatabase()
Resolve the effective default database (catalog) used to qualify
unqualified / partial object names, with a three-tier precedence:
the active global database — an in-script
USE database, or the
per-group database set by DataFlowAnalyzer;
the per-analysis Option.getDefaultDatabase();
the attached TSQLEnv default catalog;
TSQLEnv.DEFAULT_DB_NAME.
Each lower tier is consulted only when the higher tier is null/empty. |
static String |
getEffectiveDefaultSchema()
The schema an unqualified name defaults to right now.
|
String |
getElementTypeName(String collectionName)
Deprecated.
|
Set<Object> |
getFunctionResults(RoutineAliasKey key)
A routine's function results, by its name as written (the exact name, else the other shape's routine level).
|
Set<Object> |
getFunctionTable(Object gspModel)
Deprecated.
|
List<TParseTreeNode> |
getFunctoinCalls() |
static String |
getGlobalDatabase() |
static IdentifierInputForm |
getGlobalDatabaseForm()
CATALOG_STORED when the global database text is a stored name, else null. |
static String |
getGlobalDatabaseSpelling()
The global database as a SQL spelling: its text, delimited when it is a stored name that needs it.
|
static String |
getGlobalHash() |
static IdentifierService |
getGlobalIdentifierService()
The analysis's identifier service, or the vendor default when no analysis configured one.
|
static IdentifierService |
getGlobalIdentifierServiceRaw() |
static Option |
getGlobalOption() |
static OraclePackage |
getGlobalOraclePackage() |
static TStoredProcedureSqlStatement |
getGlobalProcedure() |
static String |
getGlobalSchema() |
static IdentifierInputForm |
getGlobalSchemaForm()
CATALOG_STORED when the global schema text is a stored name, else null. |
static String |
getGlobalSchemaSpelling()
The global schema as a SQL spelling: its text, delimited when it is a stored name that needs it.
|
static String |
getGlobalServer() |
static TSQLEnv |
getGlobalSQLEnv() |
static IndexedLinkedHashMap<String,List<SqlInfo>> |
getGlobalSqlInfo() |
static Stack<TCustomSqlStatement> |
getGlobalStmtStack() |
static EDbVendor |
getGlobalVendor() |
Map |
getHashSQLMap() |
Object |
getInsertModel(Object gspModel) |
Table |
getLocalSymbol(LocalSymbolKey key)
The local symbol under a typed key, or null.
|
Object |
getMergeModel(Object gspModel) |
List<TParseTreeNode> |
getMergeResultSets() |
Object |
getModel(Object gspModel) |
List<String> |
getObjectTypeFields(String normalizedName)
Deprecated.
|
List<String> |
getObjectTypeFieldsByKey(Object typeKey)
The fields of the object type a key names, or null.
|
OraclePackage |
getOraclePackage(RoutineAliasKey key) |
OraclePackage |
getOraclePackageByName(String oraclePackageName)
Deprecated.
packages are keyed by their names as written: use
getOraclePackage(RoutineAliasKey) |
List<OraclePackage> |
getOraclePackageModels() |
List<TParseTreeNode> |
getOutputResultSets() |
List<PendingPipelinedCallSite> |
getPendingPipelinedCallSites() |
Map<String,List<PipelinedFunctionSignature>> |
getPipelinedSignatures()
Deprecated.
|
Map<Object,List<PipelinedFunctionSignature>> |
getPipelinedSignaturesByKey()
The pipelined signature registry: signatures under the identities of their names (and deprecated text keys).
|
List<TParseTreeNode> |
getPivotdTables() |
Procedure |
getProcedure(RoutineAliasKey key)
The routine a name as written refers to, by the legacy index's precedence (RoutineAliasRegistry.lookup).
|
Procedure |
getProcedureByName(String procedureName)
Deprecated.
routines are keyed by their names as written: use
getProcedure(RoutineAliasKey) |
List<Procedure> |
getProcedureModels() |
List<TStoredProcedureSqlStatement> |
getProcedures() |
Process |
getProcessModel(TParseTreeNode gspModel) |
List<Process> |
getProcessModels() |
List<TObjectNameList> |
getQueryAliasTables() |
Relationship[] |
getRelations() |
Set<String> |
getResolvingPipelinedFunctions() |
Set<ResultSet> |
getResultSets() |
Procedure |
getRoutineModel(TCustomSqlStatement routine)
The lineage model of a routine statement: the routine model last bound to it, whatever else the statement was
bound to since.
|
List<TResultColumnList> |
getSelectResultSets() |
List<TSelectSqlStatement> |
getSelectSetResultSets() |
String |
getSqlHash(TCustomSqlStatement stmt) |
SqllrObservations |
getSqllrObservations()
The SQL-LR observation recorder of this analysis, or null.
|
TTable |
getTable(TCustomSqlStatement stmt,
TObjectName column) |
Table |
getTableByName(Object tableKey)
A canonical miss must not fall back to a case-folded display name.
|
Table |
getTableByName(String tableName)
A table or other named object bound under a name; inside a statement, a local symbol visible from it under the
name as written answers before the name is read again with the session's defaults, as it always has.
|
TObjectName[] |
getTableColumns(TTable table) |
TTable |
getTableFromColumn(TObjectName column) |
List<Table> |
getTablesByName() |
List<TTable> |
getTableWithSelectSetResultSets() |
Object |
getUpdateModel(Object gspModel) |
List<TParseTreeNode> |
getUpdateResultSets() |
Object |
getViewModel(Object gspModel) |
List<TCustomSqlStatement> |
getViews() |
TTable |
guessTable(TCustomSqlStatement stmt,
TObjectName column) |
boolean |
hasContestedNormalNames()
Whether any two different names in this analysis share a legacy normal name.
|
boolean |
hasIdentityScope() |
void |
indexCollectionElementType(Object collectionKey,
String elementTypeName)
Indexes a collection type's element type, the element type's name as written, under the collection's key.
|
void |
indexCollectionType(String collectionName,
String elementTypeName)
Deprecated.
|
void |
indexObjectType(String normalizedName,
List<String> fieldNames)
Deprecated.
types are keyed by their names as written: use
indexObjectTypeFields(Object, List) |
void |
indexObjectTypeFields(Object typeKey,
List<String> fieldNames)
Indexes an object type's fields under the identity of its name.
|
boolean |
isDblinkTable(String name) |
static boolean |
isGlobalSchemaUnset()
Whether the statement being analyzed right now has no current schema
because a Snowflake
USE <database> unset it. |
static boolean |
isScopedTemporary(TTable table)
Whether a table reference names one routine body's temporary table rather than a shared
one: its name says so (
#t), or resolver2 bound it to a table that a routine
declared temporary (CREATE TEMP TABLE t). |
static boolean |
isSyntheticStmtContext() |
void |
leaveTemporaryTableScope(List<Map> saved)
Local declarations remain in the output, but cannot become another routine's metadata.
|
Table |
lookupVisibleLocalSymbol(LocalSymbolKey key,
TCustomSqlStatement stmt)
The local symbol a reference in
stmt sees under key's name: the first scope of the statement's
lexical chain (routine, enclosing routines, package) that declares it; at top level, the top-level one. |
Table |
lookupVisibleLocalSymbol(LocalSymbolKey key,
TCustomSqlStatement stmt,
boolean topLevel)
As
lookupVisibleLocalSymbol(gudusoft.gsqlparser.dlineage.symbol.LocalSymbolKey, TCustomSqlStatement);
with topLevel, a declaration at top level is visible from inside a routine too (a declared type). |
String |
normalName(EDbVendor vendor,
ESQLDataObjectType type,
String origin,
String legacy)
The normal name of one identifier segment in this analysis: its legacy name, unless a
different name shares that string (see
NormalNameCollisions). |
<T> T |
observeCommentOccurrence(Object ast,
T model)
Records the model actually selected by the factory, without changing its lookup maps.
|
String |
peekIdentityScope()
Deprecated.
the pool is keyed by
peekPoolScope(); this is its legacy text, never used to resolve. |
Object |
peekPoolScope()
The active overload pool's typed scope, or null.
|
void |
popIdentityScope() |
void |
publishLocalSymbol(LocalSymbolKey key,
Table symbol)
Binds a local symbol by its key and lists it among the analysis's tables at this point (getTablesByName, and so
the output order), as every binding of a variable, cursor or correlation name has been listed.
|
void |
pushIdentityScope(String identityScopeKey)
Deprecated.
an overload pool is keyed by its typed scope: use
pushIdentityScope(String, Object). |
void |
pushIdentityScope(String identityScopeKey,
Object poolScope)
Enters an overload's pool: its typed scope (
IdentityScope) and its legacy identity text (metadata). |
static void |
remove() |
static void |
removeGlobalDatabase() |
static void |
removeGlobalHash() |
static void |
removeGlobalIdentifierService() |
static void |
removeGlobalOption() |
static void |
removeGlobalOraclePackage() |
static void |
removeGlobalProcedure() |
static void |
removeGlobalSchema() |
static void |
removeGlobalSQLEnv() |
static void |
removeGlobalSqlInfo() |
static void |
removeGlobalStmtStack() |
static void |
removeGlobalVendor() |
void |
removeRelation(ImpactRelationship relation) |
static void |
removeSchemaUnsetStatements() |
void |
reset() |
Table |
resolveMixedRelation(String written,
Table tablePath,
boolean localFirst)
A name that may denote a table or a local relation (table variable, cursor, record), by the site's precedence:
with
localFirst (a %ROWTYPE or %TYPE anchor, a qualifier no FROM item declares) the local relation visible
from the current statement answers before the table path, as PL/SQL scoping does; otherwise (a FROM or DML
relation) the table path's answer stands and the local relation answers only when the table path has none. |
static void |
restoreGlobalProcedure(TStoredProcedureSqlStatement procedureSqlStatement)
Puts back the routine a statement was analyzed under, null for none.
|
RoutineShadow.State |
routineShadowState()
The routine-registry shadow of this analysis (measurement only; see RoutineShadow).
|
static void |
set(ModelBindingManager modelManager) |
void |
setContestedNormalNames(EDbVendor vendor,
Set<String> contested)
Publishes the legacy normal names that different names share in this analysis, as
NormalNameCollisions.scan(gudusoft.gsqlparser.EDbVendor, java.util.Collection<java.lang.String>) found them; null clears them. |
void |
setCurrentStatementOrdinal(long currentStatementOrdinal) |
static void |
setGlobalDatabase(String database) |
static void |
setGlobalDatabase(String database,
IdentifierInputForm form)
setGlobalDatabase(String) with the form the text arrived in; null is a SQL spelling. |
static void |
setGlobalHash(String hash) |
static void |
setGlobalIdentifierService(IdentifierService service)
Install the analysis's identifier service for this thread.
|
static void |
setGlobalOption(Option option) |
static void |
setGlobalOraclePackage(OraclePackage currentOraclePackage) |
static void |
setGlobalProcedure(TStoredProcedureSqlStatement procedureSqlStatement) |
static void |
setGlobalSchema(String schema) |
static void |
setGlobalSchema(String schema,
IdentifierInputForm form)
setGlobalSchema(String) with the form the text arrived in; null is a SQL spelling. |
static void |
setGlobalSQLEnv(TSQLEnv sqlenv) |
static void |
setGlobalSqlInfo(IndexedLinkedHashMap<String,List<SqlInfo>> sqlInfoMap) |
static void |
setGlobalStmtStack(Stack<TCustomSqlStatement> stack) |
static void |
setGlobalVendor(EDbVendor vendor) |
static void |
setSchemaUnsetStatements(Set<TCustomSqlStatement> statements)
The statements that a Snowflake
USE <database> left with NO current
schema, i.e. |
void |
setSqllrObservations(SqllrObservations observations)
Binds a SQL-LR observation recorder to this analysis.
|
static void |
setSyntheticStmtContext(boolean synthetic) |
void |
unbindProcessModel(TParseTreeNode gspModel) |
protected void |
updateTableAliasMap(TTable table) |
boolean |
useLegacyNormalNames(boolean legacy)
Makes
normalName(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String) return legacy names, for a pass that only relabels finished output
(normalized display names are bare, as the legacy fold made them). |
Table |
visibleLocal(String written,
LocalSymbolKey.Kind kind)
The local symbol visible from the current statement under a name as written (a leading ':' is a sigil).
|
void |
visitExactBindings(BiConsumer<Object,Object> visitor)
Read existing AST bindings without name fallback, allocation, or ID changes.
|
public Map<String,Long> DISPLAY_ID
public Map<Long,String> DISPLAY_NAME
public Map<String,String> virtualTableNames
public long TABLE_COLUMN_ID
public long RELATION_ID
public int virtualTableIndex
public ModelBindingManager()
public SqllrObservations getSqllrObservations()
public void setSqllrObservations(SqllrObservations observations)
public long getCurrentStatementOrdinal()
public void setCurrentStatementOrdinal(long currentStatementOrdinal)
public static boolean isSyntheticStmtContext()
public static void setSyntheticStmtContext(boolean synthetic)
public static void set(ModelBindingManager modelManager)
public static ModelBindingManager get()
public static void setGlobalDatabase(String database)
public static void setGlobalDatabase(String database, IdentifierInputForm form)
setGlobalDatabase(String) with the form the text arrived in; null is a SQL spelling.public static IdentifierInputForm getGlobalDatabaseForm()
CATALOG_STORED when the global database text is a stored name, else null.public static String getGlobalDatabaseSpelling()
public static String getGlobalDatabase()
public static void removeGlobalDatabase()
public static void setGlobalSchema(String schema)
public static void setGlobalSchema(String schema, IdentifierInputForm form)
setGlobalSchema(String) with the form the text arrived in; null is a SQL spelling.public static IdentifierInputForm getGlobalSchemaForm()
CATALOG_STORED when the global schema text is a stored name, else null.public static String getGlobalSchemaSpelling()
public static void removeGlobalSchema()
public static String getGlobalSchema()
public static void setSchemaUnsetStatements(Set<TCustomSqlStatement> statements)
USE <database> left with NO current
schema, i.e. everything after such a switch up to the next schema switch.
Recorded as a set of statements rather than as a running flag on
purpose. The analyzer walks the statement list several times - one pass for
CREATE TABLE, another for views, another for procedures - replaying the
USE statements in each. A running flag set during one pass is still
set when a LATER pass reaches a statement that precedes the switch, so it
would apply the clearing backwards and strip an already-exact qualification
off a statement that ran while the old schema was still current. Keyed by
statement, the answer is the same no matter which pass asks.
See GitHub #715 / MantisBT 4677.
public static void removeSchemaUnsetStatements()
public static boolean isGlobalSchemaUnset()
USE <database> unset it.setSchemaUnsetStatements(Set)public static void setGlobalHash(String hash)
public static void removeGlobalHash()
public static String getGlobalHash()
public static void setGlobalOraclePackage(OraclePackage currentOraclePackage)
public static void removeGlobalOraclePackage()
public static OraclePackage getGlobalOraclePackage()
public static void setGlobalProcedure(TStoredProcedureSqlStatement procedureSqlStatement)
public static void removeGlobalProcedure()
public static void restoreGlobalProcedure(TStoredProcedureSqlStatement procedureSqlStatement)
removeGlobalProcedure()
this ends no routine: the temporary tables stay where they are.public static TStoredProcedureSqlStatement getGlobalProcedure()
public static void setGlobalVendor(EDbVendor vendor)
public static void removeGlobalVendor()
public static EDbVendor getGlobalVendor()
public static void setGlobalIdentifierService(IdentifierService service)
Callers save the previous value and restore it in a finally block; nesting on one
thread and thread-pool reuse both depend on that, and a leaked service would let the next
analysis on the same worker key its model under another run's rules.
service - the frozen service; null clears the bindingpublic static void removeGlobalIdentifierService()
public void setContestedNormalNames(EDbVendor vendor, Set<String> contested)
NormalNameCollisions.scan(gudusoft.gsqlparser.EDbVendor, java.util.Collection<java.lang.String>) found them; null clears them.public boolean useLegacyNormalNames(boolean legacy)
normalName(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, java.lang.String) return legacy names, for a pass that only relabels finished output
(normalized display names are bare, as the legacy fold made them).public boolean hasContestedNormalNames()
public String normalName(EDbVendor vendor, ESQLDataObjectType type, String origin, String legacy)
NormalNameCollisions).public static IdentifierService getGlobalIdentifierServiceRaw()
public static IdentifierService getGlobalIdentifierService()
public static void setGlobalSQLEnv(TSQLEnv sqlenv)
public static void removeGlobalSQLEnv()
public static TSQLEnv getGlobalSQLEnv()
public static String getGlobalServer()
public static String getEffectiveDefaultDatabase()
USE database, or the
per-group database set by DataFlowAnalyzer;Option.getDefaultDatabase();TSQLEnv default catalog;TSQLEnv.DEFAULT_DB_NAME.TSQLEnv be reused across analyses with
different per-analysis default databases (tier 2) without mutating the env,
while still honoring an in-script USE database (tier 1).public static String getEffectiveDefaultSchema()
Six model classes used to carry an identical copy of this fallback; it
lives here so the unset rule cannot be
applied to some of them and forgotten on the others. Returns
TSQLEnv.DEFAULT_SCHEMA_NAME when there is no schema to default to.
getEffectiveDefaultDatabase()public static void setGlobalStmtStack(Stack<TCustomSqlStatement> stack)
public static void removeGlobalStmtStack()
public static void setGlobalSqlInfo(IndexedLinkedHashMap<String,List<SqlInfo>> sqlInfoMap)
public static void removeGlobalSqlInfo()
public static IndexedLinkedHashMap<String,List<SqlInfo>> getGlobalSqlInfo()
public static void setGlobalOption(Option option)
public static Option getGlobalOption()
public static void removeGlobalOption()
public static Stack<TCustomSqlStatement> getGlobalStmtStack()
public static void remove()
public <T> T observeCommentOccurrence(Object ast, T model)
public void visitExactBindings(BiConsumer<Object,Object> visitor)
protected void updateTableAliasMap(TTable table)
public Object getBoundModel(Object gspModel)
gspModel itself, never one found by its name: a relation such as a LATERAL VIEW
must not take the model of a table that has its name (getModel(java.lang.Object) falls back to the name of a TTable).public List<Procedure> getProcedureModels()
public List<OraclePackage> getOraclePackageModels()
public List<Process> getProcessModels()
public void bindProcessModel(TParseTreeNode gspModel, Object relationModel)
public void unbindProcessModel(TParseTreeNode gspModel)
public Process getProcessModel(TParseTreeNode gspModel)
public void bindViewModel(Object gspModel, Object relationModel)
public Object getViewModel(Object gspModel)
public void bindUpdateModel(Object gspModel, Object relationModel)
public Object getUpdateModel(Object gspModel)
public void bindMergeModel(Object gspModel, Object relationModel)
public Object getMergeModel(Object gspModel)
public void bindInsertModel(Object gspModel, Object relationModel)
public Object getInsertModel(Object gspModel)
public void bindFunctionResult(RoutineAliasKey key, Object functionTable)
public Set<Object> getFunctionResults(RoutineAliasKey key)
@Deprecated public void bindTableFunction(Object gspModel, Object functionTable)
bindFunctionResult(RoutineAliasKey, Object)@Deprecated public Set<Object> getFunctionTable(Object gspModel)
getFunctionResults(RoutineAliasKey)public Table getCreateTable(TTable table)
public Table getCreateModel(TTable table)
public static boolean isScopedTemporary(TTable table)
#t), or resolver2 bound it to a table that a routine
declared temporary (CREATE TEMP TABLE t). See
TemporaryTableSemantics.public void bindCreateModel(TTable table, Table tableModel)
public void bindCreateModel(TObjectName tableName, Table tableModel)
public void bindCreateModel(String tableName, Table tableModel)
public TObjectName[] getTableColumns(TTable table)
public TTable getTableFromColumn(TObjectName column)
public TTable getTable(TCustomSqlStatement stmt, TObjectName column)
public TTable guessTable(TCustomSqlStatement stmt, TObjectName column)
public List<Table> getTablesByName()
public List<TTable> getBaseTables()
public List<TCustomSqlStatement> getViews()
public List<TResultColumnList> getSelectResultSets()
public List<TObjectNameList> getQueryAliasTables()
public List<TSelectSqlStatement> getSelectSetResultSets()
public List<TTable> getTableWithSelectSetResultSets()
public List<TParseTreeNode> getMergeResultSets()
public List<TParseTreeNode> getOutputResultSets()
public List<TParseTreeNode> getUpdateResultSets()
public List<TParseTreeNode> getFunctoinCalls()
public List<TParseTreeNode> getAliases()
public List<TParseTreeNode> getCursors()
public List<TParseTreeNode> getPivotdTables()
public void addRelation(Relationship relation)
public void removeRelation(ImpactRelationship relation)
public Relationship[] getRelations()
public void reset()
public void bindCursorModel(TCursorDeclStmt stmt, Variable resultSet)
public void bindCursorModel(TMssqlDeclare stmt, Variable resultSet)
public void bindCursorModel(TOpenforStmt stmt, Variable resultSet)
public void bindCursorModel(TForStmt stmt, Variable resultSet)
public void bindCursorModel(TLoopStmt stmt, Variable resultSet)
public void bindCursorIndex(TObjectName indexName, TObjectName cursorName)
public List<TStoredProcedureSqlStatement> getProcedures()
public void bindTableByName(String tableName, Table tableModel)
public void bindTableByName(Object tableName, Table tableModel)
@Deprecated public void pushIdentityScope(String identityScopeKey)
pushIdentityScope(String, Object).public void pushIdentityScope(String identityScopeKey, Object poolScope)
IdentityScope) and its legacy identity text (metadata). Every
push is matched by a popIdentityScope(); a pool without a typed scope is entered but never active.public void popIdentityScope()
public Object peekPoolScope()
public boolean hasIdentityScope()
@Deprecated public String peekIdentityScope()
peekPoolScope(); this is its legacy text, never used to resolve.public void bindLocalSymbol(LocalSymbolKey key, Table symbol)
public void publishLocalSymbol(LocalSymbolKey key, Table symbol)
public Table lookupVisibleLocalSymbol(LocalSymbolKey key, TCustomSqlStatement stmt)
stmt sees under key's name: the first scope of the statement's
lexical chain (routine, enclosing routines, package) that declares it; at top level, the top-level one.public Table lookupVisibleLocalSymbol(LocalSymbolKey key, TCustomSqlStatement stmt, boolean topLevel)
lookupVisibleLocalSymbol(gudusoft.gsqlparser.dlineage.symbol.LocalSymbolKey, TCustomSqlStatement);
with topLevel, a declaration at top level is visible from inside a routine too (a declared type).public Table visibleLocal(String written, LocalSymbolKey.Kind kind)
public Table resolveMixedRelation(String written, Table tablePath, boolean localFirst)
localFirst (a %ROWTYPE or %TYPE anchor, a qualifier no FROM item declares) the local relation visible
from the current statement answers before the table path, as PL/SQL scoping does; otherwise (a FROM or DML
relation) the table path's answer stands and the local relation answers only when the table path has none.public Table getLocalSymbol(LocalSymbolKey key)
public Table getTableByName(Object tableKey)
public Table getTableByName(String tableName)
public RoutineShadow.State routineShadowState()
public Procedure getRoutineModel(TCustomSqlStatement routine)
public void bindProcedure(RoutineAliasKey key, Procedure procedureModel)
@Deprecated public void bindProcedureByName(String procedureName, Procedure procedureModel)
bindProcedure(RoutineAliasKey, Procedure)@Deprecated public Procedure getProcedureByName(String procedureName)
getProcedure(RoutineAliasKey)public Procedure getProcedure(RoutineAliasKey key)
public void bindOraclePackage(RoutineAliasKey key, OraclePackage oraclePackageModel)
public OraclePackage getOraclePackage(RoutineAliasKey key)
@Deprecated public void bindOraclePackageByName(String oraclePackageName, OraclePackage oraclePackageModel)
bindOraclePackage(RoutineAliasKey, OraclePackage)@Deprecated public OraclePackage getOraclePackageByName(String oraclePackageName)
getOraclePackage(RoutineAliasKey)public String getSqlHash(TCustomSqlStatement stmt)
public Map getHashSQLMap()
public Map getDynamicSQLMap()
public void collectSqlHash(TCustomSqlStatement stmt)
public void collectDynamicSqlHash(TCustomSqlStatement stmt)
public void appendDblinkTable(String name)
public boolean isDblinkTable(String name)
public Set<ResultSet> getResultSets()
public void cleanTempTable()
public List<Map> enterTemporaryTableScope()
public void leaveTemporaryTableScope(List<Map> saved)
public Set<Table> getDropTables()
@Deprecated public void indexObjectType(String normalizedName, List<String> fieldNames)
indexObjectTypeFields(Object, List)@Deprecated public List<String> getObjectTypeFields(String normalizedName)
getObjectTypeFieldsByKey(Object)@Deprecated public void indexCollectionType(String collectionName, String elementTypeName)
indexCollectionElementType(Object, String)@Deprecated public String getElementTypeName(String collectionName)
getCollectionElementType(Object)public void indexObjectTypeFields(Object typeKey, List<String> fieldNames)
public List<String> getObjectTypeFieldsByKey(Object typeKey)
public void indexCollectionElementType(Object collectionKey, String elementTypeName)
public String getCollectionElementType(Object collectionKey)
public void addPipelinedSignature(PipelinedFunctionSignature sig)
@Deprecated public PipelinedFunctionSignature findPipelinedSignature(List<String> candidates, int argCount)
findPipelinedSignatureByKeys(List, int)public PipelinedFunctionSignature findPipelinedSignatureByKeys(List<?> keys, int argCount)
keys that has any accepting argCount (any count
when negative); null when none, or when that key is ambiguous.@Deprecated public PipelinedFunctionSignature findPipelinedSignatureAny(List<String> candidates)
findPipelinedSignatureAnyByKeys(List)public PipelinedFunctionSignature findPipelinedSignatureAnyByKeys(List<?> keys)
keys that has exactly one; null when none.public void addPendingPipelinedCallSite(PendingPipelinedCallSite callSite)
public List<PendingPipelinedCallSite> getPendingPipelinedCallSites()
public Set<String> getResolvingPipelinedFunctions()
@Deprecated public Map<String,List<PipelinedFunctionSignature>> getPipelinedSignatures()
getPipelinedSignaturesByKey()public Map<Object,List<PipelinedFunctionSignature>> getPipelinedSignaturesByKey()