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) |
String |
normalizeName(String name) |
String |
normalizeName(String name,
DatabaseMetaData databaseMetaData) |
public static boolean isObjectTable(List<Long> companyIds, String tableName)
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
public boolean hasTable(String tableName, boolean caseSensitive) throws Exception
Exception
public boolean isControlTable(List<Long> companyIds, String tableName) throws Exception
Exception
public boolean isNullable(String tableName, String columnName) throws SQLException
SQLException
public String normalizeName(String name) throws SQLException
SQLException
public String normalizeName(String name, DatabaseMetaData databaseMetaData) throws SQLException
SQLException