|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.flyway.core.dbsupport.sqlserver.SQLServerDbSupport
public class SQLServerDbSupport
MSsql-specific support.
| Constructor Summary | |
|---|---|
SQLServerDbSupport(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Creates a new instance. |
|
| Method Summary | |
|---|---|
SqlScript |
createCleanScript(java.lang.String schema)
Creates a new sql script which clean this schema, by dropping all objects. |
SqlScript |
createSqlScript(java.lang.String sqlScriptSource,
PlaceholderReplacer placeholderReplacer)
Creates a new sql script from this resource with these placeholders to replace. |
java.lang.String |
getBooleanFalse()
|
java.lang.String |
getBooleanTrue()
|
java.lang.String |
getCurrentSchema()
Retrieves the current schema. |
java.lang.String |
getCurrentUserFunction()
|
java.lang.String |
getScriptLocation()
Returns the location on the classpath where the scripts for this database reside. |
boolean |
isSchemaEmpty(java.lang.String schema)
Checks if this database schema is empty. |
void |
lockTable(java.lang.String schema,
java.lang.String table)
Locks this table in this schema using a read/write pessimistic lock until the end of the current transaction. |
boolean |
supportsDdlTransactions()
Checks whether ddl transactions are supported for this database. |
boolean |
tableExists(java.lang.String schema,
java.lang.String table)
Checks whether this table is already present in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLServerDbSupport(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
jdbcTemplate - The jdbcTemplate to use.| Method Detail |
|---|
public java.lang.String getScriptLocation()
DbSupport
getScriptLocation in interface DbSupportpublic java.lang.String getCurrentUserFunction()
getCurrentUserFunction in interface DbSupportpublic java.lang.String getCurrentSchema()
DbSupport
getCurrentSchema in interface DbSupportpublic boolean isSchemaEmpty(java.lang.String schema)
DbSupport
isSchemaEmpty in interface DbSupportschema - The schema to check.
true if it is empty, false if it is not.
public boolean tableExists(java.lang.String schema,
java.lang.String table)
DbSupport
tableExists in interface DbSupportschema - The schema in which to look.table - The table to look for.
true if the table exists, false if it doesn't.public boolean supportsDdlTransactions()
DbSupport
supportsDdlTransactions in interface DbSupporttrue if ddl transactions are supported, false if not.
public void lockTable(java.lang.String schema,
java.lang.String table)
DbSupport
lockTable in interface DbSupportschema - The schema of the table to lock.table - The table to lock.public java.lang.String getBooleanTrue()
getBooleanTrue in interface DbSupporttrue in a boolean column.public java.lang.String getBooleanFalse()
getBooleanFalse in interface DbSupportfalse in a boolean column.
public SqlScript createSqlScript(java.lang.String sqlScriptSource,
PlaceholderReplacer placeholderReplacer)
DbSupport
createSqlScript in interface DbSupportsqlScriptSource - The sql script as a text block with all placeholders still present.placeholderReplacer - The placeholder replacer to apply to sql migration scripts.
public SqlScript createCleanScript(java.lang.String schema)
DbSupport
createCleanScript in interface DbSupportschema - The schema to clean.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||