Class OracleDatabase
- java.lang.Object
-
- migratedb.core.internal.database.base.BaseDatabase<OracleConnection>
-
- migratedb.core.internal.database.oracle.OracleDatabase
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Database<OracleConnection>
public class OracleDatabase extends BaseDatabase<OracleConnection>
-
-
Field Summary
-
Fields inherited from class migratedb.core.internal.database.base.BaseDatabase
configuration, databaseType, jdbcConnectionFactory, jdbcMetaData, jdbcTemplate, rawMainJdbcConnection
-
-
Constructor Summary
Constructors Constructor Description OracleDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancatalogIsSchema()protected StringdoGetCatalog()protected OracleConnectiondoGetConnection(Connection connection)Retrieves a MigrateDB Connection for this JDBC connection.protected StringdoGetCurrentUser()static voidenableTnsnamesOraSupport()If the TNS_ADMIN environment variable is set, enable tnsnames.ora support for the Oracle JDBC driver.voidensureSupported()Ensure MigrateDB supports this version of this database.StringgetBooleanFalse()StringgetBooleanTrue()StringgetRawCreateScript(Table<?,?> table, boolean baseline)booleansupportsChangingCurrentSchema()booleansupportsDdlTransactions()booleansupportsEmptyMigrationDescription()-
Methods inherited from class migratedb.core.internal.database.base.BaseDatabase
cleanPostSchemas, cleanPreSchemas, close, computeVersionDisplayName, determineVersion, doCleanPostSchemas, doCleanPreSchemas, doQuote, ensureDatabaseIsRecentEnough, getAllSchemas, getBaselineStatement, getCatalog, getCloseQuote, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getEscapedQuote, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainConnection, getMigrationConnection, getOpenQuote, getSelectStatement, getVersion, quote, recommendMigrateDbUpgradeIfNecessary, recommendMigrateDbUpgradeIfNecessaryForMajorVersion, supportsMultiStatementTransactions, unQuote, useSingleConnection
-
-
-
-
Constructor Detail
-
OracleDatabase
public OracleDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
-
-
Method Detail
-
enableTnsnamesOraSupport
public static void enableTnsnamesOraSupport()
If the TNS_ADMIN environment variable is set, enable tnsnames.ora support for the Oracle JDBC driver. See TNS ADMIN
-
doGetConnection
protected OracleConnection doGetConnection(Connection connection)
Description copied from class:BaseDatabaseRetrieves a MigrateDB Connection for this JDBC connection.- Specified by:
doGetConnectionin classBaseDatabase<OracleConnection>
-
ensureSupported
public final void ensureSupported()
Description copied from interface:DatabaseEnsure MigrateDB supports this version of this database.
-
supportsEmptyMigrationDescription
public boolean supportsEmptyMigrationDescription()
- Specified by:
supportsEmptyMigrationDescriptionin interfaceDatabase<OracleConnection>- Overrides:
supportsEmptyMigrationDescriptionin classBaseDatabase<OracleConnection>
-
doGetCatalog
protected String doGetCatalog() throws SQLException
- Overrides:
doGetCatalogin classBaseDatabase<OracleConnection>- Throws:
SQLException
-
doGetCurrentUser
protected String doGetCurrentUser() throws SQLException
- Overrides:
doGetCurrentUserin classBaseDatabase<OracleConnection>- Throws:
SQLException
-
supportsDdlTransactions
public boolean supportsDdlTransactions()
-
supportsChangingCurrentSchema
public boolean supportsChangingCurrentSchema()
-
getBooleanTrue
public String getBooleanTrue()
- Returns:
- The representation of the value
truein a boolean column.
-
getBooleanFalse
public String getBooleanFalse()
- Returns:
- The representation of the value
falsein a boolean column.
-
catalogIsSchema
public boolean catalogIsSchema()
- Returns:
trueif this database uses a catalog to represent a schema, orfalseif a schema is simply a schema.
-
-