public interface DbmsBean
| Modifier and Type | Method and Description |
|---|---|
boolean |
dropColumn(Connection connection,
String tableName,
String columnName)
Checks whether given table contains the specified column and drops it
|
boolean |
dropColumn(Connection connection,
String tableName,
String columnName,
List<String> defaultConstraintNames,
String indexName)
Checks whether given table contains the specified column and drops it, as well as foreign key constraints and index on the column.
|
String |
getConcat(String... values)
Provide a different SQL concatenation operator depending on SQL engine used.
|
String |
getQuery(SqlQueryProvider sqlQueryProvider)
Provide a different SQL query depending on SQL engine used.
|
boolean |
isColumnPresent(Connection connection,
String tableName,
String columnName)
Checks whether given table contains the specified column.
|
boolean |
isColumnPresent(Statement statement,
String tableName,
String columnName)
Checks whether given table contains the specified column.
|
boolean |
isHsqldb() |
boolean |
isMsSqlServer() |
boolean |
isMySql() |
boolean |
isOracle() |
boolean |
isPostgreSql() |
boolean |
isTablePresent(Connection connection,
String tableName)
Checks whether given table is present in the database
|
boolean |
isTablePresent(Statement statement,
String tableName)
Checks whether given table is present in the database
|
PreparedStatement |
prepareStatement(Connection connection,
PreparedStatementProvider preparedStatementProvider)
Provide a different
PreparedStatement depending on SQL engine used. |
void |
resizeVarcharColumn(Statement statement,
String tableName,
String columnName,
int newSize,
boolean isNullable,
String defaultValue) |
@NotNull String getQuery(@NotNull SqlQueryProvider sqlQueryProvider)
sqlQueryProvider - @NotNull String getConcat(String... values)
values - the values to concatenate.@NotNull PreparedStatement prepareStatement(@NotNull Connection connection, @NotNull PreparedStatementProvider preparedStatementProvider) throws SQLException
PreparedStatement depending on SQL engine used.connection - preparedStatementProvider - SQLExceptionboolean isColumnPresent(@NotNull
Connection connection,
@NotNull
String tableName,
@NotNull
String columnName)
throws SQLException
connection - tableName - columnName - SQLExceptionboolean isColumnPresent(@NotNull
Statement statement,
@NotNull
String tableName,
@NotNull
String columnName)
throws SQLException
statement - tableName - columnName - SQLExceptionboolean dropColumn(@NotNull
Connection connection,
@NotNull
String tableName,
@NotNull
String columnName)
throws SQLException
connection - tableName - columnName - SQLExceptionboolean dropColumn(@NotNull
Connection connection,
@NotNull
String tableName,
@NotNull
String columnName,
@NotNull
List<String> defaultConstraintNames,
@Nullable
String indexName)
throws SQLException
connection - tableName - columnName - defaultConstraintNames - indexName - SQLExceptionboolean isTablePresent(@NotNull
Statement statement,
@NotNull
String tableName)
statement - statement used to verify DB table existencetableName - name of DB tableboolean isTablePresent(@NotNull
Connection connection,
@NotNull
String tableName)
throws SQLException
connection - connection used to verify DB table existencetableName - name of DB tableSQLException - if a database error occurs or connection is closedvoid resizeVarcharColumn(@NotNull
Statement statement,
String tableName,
String columnName,
int newSize,
boolean isNullable,
@Nullable
String defaultValue)
throws SQLException
SQLExceptionboolean isMySql()
boolean isOracle()
boolean isHsqldb()
boolean isPostgreSql()
boolean isMsSqlServer()
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.