Class OracleDatabase
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseDatabase
-
- migratedb.v1.core.internal.database.oracle.OracleDatabase
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Database
public class OracleDatabase extends BaseDatabase
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
configuration, databaseType, jdbcConnectionFactory, 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 StringdoGetCurrentUser()protected OracleSessiondoGetSession(Connection connection)Retrieves a MigrateDB session for this JDBC connection.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.v1.core.internal.database.base.BaseDatabase
close, computeVersionDisplayName, determineVersion, doQuote, ensureDatabaseIsRecentEnough, getAllSchemas, getBaselineStatement, getCatalog, getCloseQuote, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getEscapedQuote, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainSession, getMigrationSession, getOpenQuote, getSelectStatement, getVersion, quote, recommendMigrateDbUpgradeIfNecessary, recommendMigrateDbUpgradeIfNecessaryForMajorVersion, supportsMultiStatementTransactions, unQuote, usesSingleSession
-
-
-
-
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
-
doGetSession
protected OracleSession doGetSession(Connection connection)
Description copied from class:BaseDatabaseRetrieves a MigrateDB session for this JDBC connection.- Specified by:
doGetSessionin classBaseDatabase
-
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- Overrides:
supportsEmptyMigrationDescriptionin classBaseDatabase
-
doGetCatalog
protected String doGetCatalog() throws SQLException
- Overrides:
doGetCatalogin classBaseDatabase- Throws:
SQLException
-
doGetCurrentUser
protected String doGetCurrentUser() throws SQLException
- Overrides:
doGetCurrentUserin classBaseDatabase- 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.
-
-