|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.sqltools.core.DBHelper
public class DBHelper
Vendors can subclass this class to provide database-specific utility methods.
| Constructor Summary | |
|---|---|
DBHelper()
|
|
| Method Summary | |
|---|---|
java.lang.String |
calculateTriggerTableName(ProcIdentifier procid)
Given a trigger, returns the table name. |
int |
getCorrectParamType(int jdbcType)
This method is for vendors to fix JDBC driver bugs. |
java.lang.String |
getExceptionChainMessage(java.sql.SQLException exception)
Returns all error messages by following the exception chain. |
ProcIdentifier |
getProcIdentifier(DatabaseIdentifier databaseIdentifier,
int dbObjectType,
java.util.Map map)
Returns a ProcIdentifer based on the profilename and object name & type. |
ProcIdentifier |
getProcIdentifier(DatabaseIdentifier databaseIdentifier,
java.lang.String dbObjectName,
int dbObjectType,
java.lang.String tableName,
java.lang.String ownerName)
Returns a ProcIdentifer based on the profilename and object name & type |
ProcIdentifier |
getProcIdentifier(DatabaseIdentifier databaseIdentifier,
java.lang.String dbObjectName,
int dbObjectType,
java.lang.String tableName,
java.lang.String ownerName,
java.lang.String tableOwnerName)
Returns a ProcIdentifer based on the profilename and object name & type. |
ServerIdentifier |
getServerIdentifier(java.lang.String host,
java.lang.String port,
java.lang.String url,
DatabaseVendorDefinitionId dbIdentifier)
Returns a ServerIdentifier identifying a data server. |
java.lang.String[] |
getSysDatabaseNames(DatabaseIdentifier identifier)
|
java.lang.String[] |
getSysOwnerNames()
Gets all the system ownerName |
boolean |
isAdHocProc(ProcIdentifier procid)
Tells whether the procedural object is "ADHOC", meaning we don't need to show stack frame and open editor for it. |
boolean |
justWarnings(java.sql.SQLException sqlexception)
|
java.lang.String |
preprocessSQLScript(java.lang.String sqlScript)
Default behavior is do nothing, and return the original sql script |
boolean |
supportsPlan(int procType)
|
java.lang.String |
switchDatabase(DatabaseIdentifier databaseIdentifier,
java.sql.Connection conn)
Switches databases(catalog) for the shared connection. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBHelper()
| Method Detail |
|---|
public java.lang.String calculateTriggerTableName(ProcIdentifier procid)
ProcIdentifier.
procid - trigger identifier
public boolean isAdHocProc(ProcIdentifier procid)
procid - the routine identifier
public ProcIdentifier getProcIdentifier(DatabaseIdentifier databaseIdentifier,
java.lang.String dbObjectName,
int dbObjectType,
java.lang.String tableName,
java.lang.String ownerName)
databaseIdentifier - dbObjectName - dbObjectType - @see ProcIdentifier
#getProcIdentifier(DatabaseIdentifier, String, int, String, String, String)}
public ProcIdentifier getProcIdentifier(DatabaseIdentifier databaseIdentifier,
java.lang.String dbObjectName,
int dbObjectType,
java.lang.String tableName,
java.lang.String ownerName,
java.lang.String tableOwnerName)
databaseIdentifier - dbObjectName - dbObjectType - @see ProcIdentifiertableOwnerName - the subject table's owner
public ProcIdentifier getProcIdentifier(DatabaseIdentifier databaseIdentifier,
int dbObjectType,
java.util.Map map)
databaseIdentifier - dbObjectType - @see ProcIdentifiermap - all other information such as procedural object name, owner, etc
public ServerIdentifier getServerIdentifier(java.lang.String host,
java.lang.String port,
java.lang.String url,
DatabaseVendorDefinitionId dbIdentifier)
host - port - url - dbIdentifier -
public boolean justWarnings(java.sql.SQLException sqlexception)
public java.lang.String[] getSysOwnerNames()
public int getCorrectParamType(int jdbcType)
jdbcType - the parameter type returned by the JDBC driver
java.sql.ParameterMetadata.parameterModeIn,java.sql.ParameterMetadata.parameterModeOut,
java.sql.ParameterMetadata.parameterModeInOut and
java.sql.ParameterMetadata.parameterModeUnknownpublic boolean supportsPlan(int procType)
public java.lang.String preprocessSQLScript(java.lang.String sqlScript)
public java.lang.String[] getSysDatabaseNames(DatabaseIdentifier identifier)
public java.lang.String switchDatabase(DatabaseIdentifier databaseIdentifier,
java.sql.Connection conn)
databaseIdentifier - conn -
public java.lang.String getExceptionChainMessage(java.sql.SQLException exception)
exception -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||