com.atlassian.bamboo.utils.db
Class MsSqlDbmsBean
java.lang.Object
com.atlassian.bamboo.utils.db.AbstractDbmsBean
com.atlassian.bamboo.utils.db.MsSqlDbmsBean
- All Implemented Interfaces:
- DbmsBean
public class MsSqlDbmsBean
- extends AbstractDbmsBean
Method Summary |
protected void |
dropConstraints(Statement statement,
String tableName,
String columnName,
List<String> defaultConstraintNames)
|
protected void |
dropIndex(Statement statement,
String indexName)
|
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 |
isMsSqlServer()
|
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MsSqlDbmsBean
public MsSqlDbmsBean()
getQuery
@NotNull
public String getQuery(@NotNull
SqlQueryProvider sqlQueryProvider)
- Description copied from interface:
DbmsBean
- Provide a different SQL query depending on SQL engine used.
- Returns:
getConcat
@NotNull
public String getConcat(String... values)
- Description copied from interface:
DbmsBean
- Provide a different SQL concatenation operator depending on SQL engine used.
- Parameters:
values
- the values to concatenate.
- Returns:
- the concatenation SQL to append to a query.
prepareStatement
@NotNull
public PreparedStatement prepareStatement(@NotNull
Connection connection,
@NotNull
PreparedStatementProvider preparedStatementProvider)
throws SQLException
- Description copied from interface:
DbmsBean
- Provide a different
PreparedStatement
depending on SQL engine used.
- Returns:
-
- Throws:
SQLException
resizeVarcharColumn
public void resizeVarcharColumn(@NotNull
Statement statement,
String tableName,
String columnName,
int newSize,
boolean isNullable,
@Nullable
String defaultValue)
throws SQLException
- Throws:
SQLException
isMsSqlServer
public boolean isMsSqlServer()
- Specified by:
isMsSqlServer
in interface DbmsBean
- Overrides:
isMsSqlServer
in class AbstractDbmsBean
- Returns:
- true if db configured in Hibernate is Microsoft SQL Server
dropIndex
protected void dropIndex(Statement statement,
String indexName)
throws SQLException
- Overrides:
dropIndex
in class AbstractDbmsBean
- Throws:
SQLException
dropConstraints
protected void dropConstraints(Statement statement,
String tableName,
String columnName,
List<String> defaultConstraintNames)
- Overrides:
dropConstraints
in class AbstractDbmsBean
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.