public class DBInspector
extends Object
Constructor and Description |
---|
DBInspector(Connection connection) |
Modifier and Type | Method and Description |
---|---|
String |
getCatalog() |
ResultSet |
getColumnsResultSet(String tableName) |
String |
getSchema() |
List<String> |
getTableNames(String tableNamePattern) |
boolean |
hasColumn(String tableName,
String columnName) |
boolean |
hasColumnType(String tableName,
String columnName,
String columnType) |
boolean |
hasIndex(String tableName,
String indexName) |
boolean |
hasRows(String tableName) |
boolean |
hasTable(String tableName) |
boolean |
hasTable(String tableName,
boolean caseSensitive)
Deprecated.
As of Cavanaugh (7.4.x), replaced by
hasTable(String) |
boolean |
hasView(String viewName) |
boolean |
isControlTable(String tableName) |
boolean |
isNullable(String tableName,
String columnName) |
boolean |
isObjectTable(List<Long> companyIds,
String tableName) |
boolean |
isPartitionedControlTable(String tableName) |
String |
normalizeName(String name) |
String |
normalizeName(String name,
DatabaseMetaData databaseMetaData) |
public String getCatalog() throws SQLException
SQLException
public ResultSet getColumnsResultSet(String tableName) throws SQLException
SQLException
public String getSchema()
public List<String> getTableNames(String tableNamePattern) throws SQLException
SQLException
public boolean hasColumn(String tableName, String columnName) throws Exception
Exception
public boolean hasColumnType(String tableName, String columnName, String columnType) throws Exception
Exception
public boolean hasIndex(String tableName, String indexName) throws Exception
Exception
public boolean hasRows(String tableName)
public boolean hasTable(String tableName) throws Exception
Exception
@Deprecated public boolean hasTable(String tableName, boolean caseSensitive) throws Exception
hasTable(String)
Exception
public boolean hasView(String viewName) throws Exception
Exception
public boolean isControlTable(String tableName)
public boolean isNullable(String tableName, String columnName) throws SQLException
SQLException
public boolean isObjectTable(List<Long> companyIds, String tableName)
public boolean isPartitionedControlTable(String tableName)
public String normalizeName(String name) throws SQLException
SQLException
public String normalizeName(String name, DatabaseMetaData databaseMetaData) throws SQLException
SQLException