|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.flyway.core.dbsupport.DbSupport
com.googlecode.flyway.core.dbsupport.oracle.OracleDbSupport
public class OracleDbSupport
Oracle-specific support.
| Field Summary |
|---|
| Fields inherited from class com.googlecode.flyway.core.dbsupport.DbSupport |
|---|
jdbcTemplate |
| Constructor Summary | |
|---|---|
OracleDbSupport(java.sql.Connection connection)
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 com.googlecode.flyway.core.dbsupport.DbSupport |
|---|
getJdbcTemplate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OracleDbSupport(java.sql.Connection connection)
connection - The connection to use.| Method Detail |
|---|
public java.lang.String getScriptLocation()
DbSupport
getScriptLocation in class DbSupportpublic java.lang.String getCurrentUserFunction()
getCurrentUserFunction in class DbSupport
public java.lang.String getCurrentSchema()
throws java.sql.SQLException
DbSupport
getCurrentSchema in class DbSupportjava.sql.SQLException - when the current schema could not be retrieved.
public boolean isSchemaEmpty(java.lang.String schema)
throws java.sql.SQLException
DbSupport
isSchemaEmpty in class DbSupportschema - The schema to check.
true if it is empty, false if it is not.
java.sql.SQLException - when there was an error checking whether the schema is empty.
public boolean tableExists(java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
DbSupport
tableExists in class DbSupportschema - The schema in which to look.table - The table to look for.
true if the table exists, false if it doesn't.
java.sql.SQLException - when there was an error checking whether this table exists in this schema.public boolean supportsDdlTransactions()
DbSupport
supportsDdlTransactions in class DbSupporttrue if ddl transactions are supported, false if not.
public void lockTable(java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
DbSupport
lockTable in class DbSupportschema - The schema of the table to lock.table - The table to lock.
java.sql.SQLException - when this table in this schema could not be locked.public java.lang.String getBooleanTrue()
getBooleanTrue in class DbSupporttrue in a boolean column.public java.lang.String getBooleanFalse()
getBooleanFalse in class DbSupportfalse in a boolean column.
public SqlScript createSqlScript(java.lang.String sqlScriptSource,
PlaceholderReplacer placeholderReplacer)
DbSupport
createSqlScript in class 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)
throws java.sql.SQLException
DbSupport
createCleanScript in class DbSupportschema - The schema to clean.
java.sql.SQLException - when querying the database for generating the clean script failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||