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) |
boolean |
isControlTable(List<Long> companyIds,
String tableName) |
boolean |
isNullable(String tableName,
String columnName) |
static boolean |
isObjectTable(List<Long> companyIds,
String tableName) |
boolean |
isPartitionedControlTable(String tableName) |
String |
normalizeName(String name) |
String |
normalizeName(String name,
DatabaseMetaData databaseMetaData) |
public static boolean isObjectTable(List<Long> companyIds,
String tableName)
public String getCatalog()
throws SQLException
SQLExceptionpublic ResultSet getColumnsResultSet(String tableName)
throws SQLException
SQLExceptionpublic String getSchema()
public List<String> getTableNames(String tableNamePattern)
throws SQLException
SQLExceptionpublic boolean hasColumn(String tableName,
String columnName)
throws Exception
Exceptionpublic boolean hasColumnType(String tableName,
String columnName,
String columnType)
throws Exception
Exceptionpublic boolean hasIndex(String tableName,
String indexName)
throws Exception
Exceptionpublic boolean hasRows(String tableName)
public boolean hasTable(String tableName)
throws Exception
Exceptionpublic boolean hasTable(String tableName,
boolean caseSensitive)
throws Exception
Exceptionpublic boolean isControlTable(List<Long> companyIds,
String tableName)
throws Exception
Exceptionpublic boolean isNullable(String tableName,
String columnName)
throws SQLException
SQLExceptionpublic boolean isPartitionedControlTable(String tableName)
public String normalizeName(String name)
throws SQLException
SQLExceptionpublic String normalizeName(String name,
DatabaseMetaData databaseMetaData)
throws SQLException
SQLException