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() |
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 static void set(ModelBindingManager modelManager)
public static ModelBindingManager get()
public static void setGlobalDatabase(String database)
public static String getGlobalDatabase()
public static void removeGlobalDatabase()
public static void setGlobalSchema(String schema)
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 TStoredProcedureSqlStatement getGlobalProcedure()
public static void setGlobalVendor(EDbVendor vendor)
public static void removeGlobalVendor()
public static EDbVendor getGlobalVendor()
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()
protected void updateTableAliasMap(TTable table)
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 bindTableFunction(Object gspModel, Object functionTable)
public Set<Object> getFunctionTable(Object gspModel)
public Table getCreateTable(TTable table)
public Table getCreateModel(TTable table)
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 pushIdentityScope(String identityScopeKey)
public void popIdentityScope()
public boolean hasIdentityScope()
public String peekIdentityScope()
public Table getTableByName(String tableName)
public void bindProcedureByName(String procedureName, Procedure procedureModel)
public Procedure getProcedureByName(String procedureName)
public void bindOraclePackageByName(String oraclePackageName, OraclePackage oraclePackageModel)
public OraclePackage getOraclePackageByName(String oraclePackageName)
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 Set<Table> getDropTables()
public void indexObjectType(String normalizedName, List<String> fieldNames)
public List<String> getObjectTypeFields(String normalizedName)
public void indexCollectionType(String collectionName, String elementTypeName)
public String getElementTypeName(String collectionName)
public void addPipelinedSignature(PipelinedFunctionSignature sig)
public PipelinedFunctionSignature findPipelinedSignature(List<String> candidates, int argCount)
public PipelinedFunctionSignature findPipelinedSignatureAny(List<String> candidates)
public void addPendingPipelinedCallSite(PendingPipelinedCallSite callSite)
public List<PendingPipelinedCallSite> getPendingPipelinedCallSites()
public Set<String> getResolvingPipelinedFunctions()
public Map<String,List<PipelinedFunctionSignature>> getPipelinedSignatures()