public class MySqlDbmsBean extends AbstractDbmsBean
Constructor and Description |
---|
MySqlDbmsBean() |
Modifier and Type | Method and Description |
---|---|
void |
changeTableNameToUpperCase(Connection connection,
String oldName)
Rename table from lower case to upper case.
|
protected void |
dropConstraints(Statement statement,
String tableName,
String columnName,
List<String> defaultConstraintNames) |
void |
dropPrimaryKey(Connection connection,
String tableName)
Drops the primary key on a table.
|
String |
getConcat(String... values)
Provide a different SQL concatenation operator depending on SQL engine used.
|
DatabaseType |
getDatabaseType()
Detect used database type
|
String |
getQuery(SqlQueryProvider sqlQueryProvider)
Provide a different SQL query depending on SQL engine used.
|
boolean |
isMySql() |
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) |
dropColumn, dropColumn, dropIndex, isColumnPresent, isColumnPresent, isHsqldb, isMsSqlServer, isOracle, isPostgreSql, isTablePresent, isTablePresent, renameColumn
@NotNull public String getQuery(@NotNull SqlQueryProvider sqlQueryProvider)
DbmsBean
@NotNull public String getConcat(String... values)
DbmsBean
values
- the values to concatenate.@NotNull public PreparedStatement prepareStatement(@NotNull Connection connection, @NotNull PreparedStatementProvider preparedStatementProvider) throws SQLException
DbmsBean
PreparedStatement
depending on SQL engine used.SQLException
public void resizeVarcharColumn(@NotNull Statement statement, String tableName, String columnName, int newSize, boolean isNullable, @Nullable String defaultValue) throws SQLException
SQLException
public boolean isMySql()
isMySql
in interface DbmsBean
isMySql
in class AbstractDbmsBean
public DatabaseType getDatabaseType()
DbmsBean
protected void dropConstraints(Statement statement, String tableName, String columnName, List<String> defaultConstraintNames)
dropConstraints
in class AbstractDbmsBean
public void changeTableNameToUpperCase(Connection connection, String oldName) throws SQLException
DbmsBean
changeTableNameToUpperCase
in interface DbmsBean
changeTableNameToUpperCase
in class AbstractDbmsBean
SQLException
public void dropPrimaryKey(Connection connection, String tableName) throws SQLException
DbmsBean
SQLException
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.