public class OracleDatabase extends AbstractJdbcDatabase
Modifier and Type | Field and Description |
---|---|
protected int |
LONG_IDENTIFIERS_LEGNTH |
static int |
ORACLE_12C_MAJOR_VERSION |
static String |
PRODUCT_NAME |
protected int |
SHORT_IDENTIFIERS_LENGTH |
caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercased
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
Constructor and Description |
---|
OracleDatabase()
Default constructor for an object that represents the Oracle Database DBMS.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAccessDbaRecycleBin() |
String |
generateDatabaseFunctionValue(DatabaseFunction databaseFunction)
Some function names are placeholders that need to be replaced with the specific database value.
|
String |
generatePrimaryKeyName(String tableName) |
protected String |
getAutoIncrementClause(String generationType,
Boolean defaultOnNull)
Default implementation.
|
protected String |
getConnectionCatalogName() |
int |
getDatabaseMajorVersion() |
int |
getDatabaseMinorVersion() |
int |
getDataTypeMaxParameters(String dataTypeName) |
String |
getDateLiteral(String isoDate)
Returns an Oracle date literal with the same value as a string formatted using ISO 8601.
|
String |
getDbaRecycleBinWarning() |
String |
getDefaultCatalogName() |
protected String |
getDefaultDatabaseProductName() |
String |
getDefaultDriver(String url)
If this database understands the given url, return the default driver class name.
|
Integer |
getDefaultPort() |
int |
getIdentifierMaximumLength()
Returns the maximum number of bytes (NOT: characters) for an identifier.
|
String |
getJdbcCatalogName(CatalogAndSchema schema) |
String |
getJdbcSchemaName(CatalogAndSchema schema) |
int |
getPriority() |
String |
getShortName()
Returns an all-lower-case short name of the product.
|
String |
getSystemTableWhereClause(String tableNameColumn) |
Set<String> |
getUserDefinedTypes() |
boolean |
isCorrectDatabaseImplementation(DatabaseConnection conn)
Is this AbstractDatabase subclass the correct one to use for the given connection.
|
boolean |
isReservedWord(String objectName) |
boolean |
isSystemObject(DatabaseObject example) |
boolean |
isValidOracleIdentifier(String identifier,
Class<? extends DatabaseObject> type)
Tests if the given String would be a valid identifier in Oracle DBMS.
|
boolean |
jdbcCallsCatalogsSchemas() |
void |
setConnection(DatabaseConnection conn) |
boolean |
supportsAutoIncrement() |
boolean |
supportsInitiallyDeferrableColumns()
Returns whether this database support initially deferrable columns.
|
boolean |
supportsNotNullConstraintNames()
Does this database treat NOT NULL as an own kind of CONSTRAINT (in addition of simply being a column property)?
This will affect the CONSTRAINT clause SQL generators.
|
boolean |
supportsRestrictForeignKeys() |
boolean |
supportsSchemas()
Oracle supports catalogs in liquibase terms
|
boolean |
supportsSequences()
Does the database type support sequence.
|
boolean |
supportsTablespaces() |
ValidationErrors |
validate() |
addReservedWords, canCreateChangeLogTable, close, commit, correctObjectName, correctSchema, correctSchema, createsIndexesForForeignKeys, dataTypeIsNotModifiable, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDataTypeName, escapeIndexName, escapeObjectName, escapeObjectName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeRollbackStatements, executeStatements, filterRollbackVisitors, generateAutoIncrementBy, generateAutoIncrementStartWith, get, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getConnectionSchemaName, getConnectionSchemaNameCallStatement, getContainingObjects, getCurrentDateTimeFunction, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseProductName, getDatabaseProductVersion, getDateFunctions, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultFractionalDigitsForTimestamp, getDefaultScaleForNativeDataType, getDefaultSchema, getDefaultSchemaName, getFetchSize, getJdbcCatalogName, getJdbcSchemaName, getLineComment, getLiquibaseCatalogName, getLiquibaseSchemaName, getLiquibaseTablespaceName, getMaxFractionalDigitsForTimestamp, getName, getObjectQuotingStrategy, getOutputDefaultCatalog, getOutputDefaultSchema, getQuotingEndCharacter, getQuotingEndReplacement, getQuotingStartCharacter, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSchemaAndCatalogCase, getSchemaFromJdbcInfo, getSystemSchema, getSystemTables, getSystemViews, getTimeLiteral, getViewDefinition, hashCode, isAutoCommit, isCaseSensitive, isDateOnly, isDateTime, isDefaultCatalog, isDefaultSchema, isFunction, isLiquibaseObject, isSafeToRunUpdate, isSystemView, isTimeOnly, isTimestamp, markChangeSetExecStatus, mustQuoteObjectName, parseDate, quoteObject, removeRanStatus, requiresExplicitNullForColumns, requiresPassword, requiresUsername, resetInternalState, rollback, saveRollbackStatement, saveStatements, set, setAutoCommit, setCanCacheLiquibaseTableInfo, setCaseSensitive, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultCatalogName, setDefaultSchemaName, setLiquibaseCatalogName, setLiquibaseSchemaName, setLiquibaseTablespaceName, setObjectQuotingStrategy, setOutputDefaultCatalog, setOutputDefaultSchema, startsWithNumeric, supportsBatchUpdates, supportsCatalogInObjectName, supportsCatalogs, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsPrimaryKeyNames, tag, toString, unescapeDataTypeName, unescapeDataTypeString
public static final String PRODUCT_NAME
protected final int SHORT_IDENTIFIERS_LENGTH
protected final int LONG_IDENTIFIERS_LEGNTH
public static final int ORACLE_12C_MAJOR_VERSION
public OracleDatabase()
public int getPriority()
public void setConnection(DatabaseConnection conn)
setConnection
in interface Database
setConnection
in class AbstractJdbcDatabase
public String getShortName()
Database
protected String getDefaultDatabaseProductName()
getDefaultDatabaseProductName
in class AbstractJdbcDatabase
public int getDatabaseMajorVersion() throws DatabaseException
getDatabaseMajorVersion
in interface Database
getDatabaseMajorVersion
in class AbstractJdbcDatabase
DatabaseException
public int getDatabaseMinorVersion() throws DatabaseException
getDatabaseMinorVersion
in interface Database
getDatabaseMinorVersion
in class AbstractJdbcDatabase
DatabaseException
public Integer getDefaultPort()
public String getJdbcCatalogName(CatalogAndSchema schema)
getJdbcCatalogName
in class AbstractJdbcDatabase
public String getJdbcSchemaName(CatalogAndSchema schema)
getJdbcSchemaName
in class AbstractJdbcDatabase
protected String getAutoIncrementClause(String generationType, Boolean defaultOnNull)
AbstractJdbcDatabase
getAutoIncrementClause
in class AbstractJdbcDatabase
public String generatePrimaryKeyName(String tableName)
generatePrimaryKeyName
in interface Database
generatePrimaryKeyName
in class AbstractJdbcDatabase
public boolean supportsInitiallyDeferrableColumns()
Database
public boolean isReservedWord(String objectName)
isReservedWord
in interface Database
isReservedWord
in class AbstractJdbcDatabase
public boolean supportsSequences()
AbstractJdbcDatabase
supportsSequences
in interface Database
supportsSequences
in class AbstractJdbcDatabase
public boolean supportsSchemas()
supportsSchemas
in interface Database
supportsSchemas
in class AbstractJdbcDatabase
protected String getConnectionCatalogName() throws DatabaseException
getConnectionCatalogName
in class AbstractJdbcDatabase
DatabaseException
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException
Database
DatabaseException
public String getDefaultDriver(String url)
Database
public String getDefaultCatalogName()
getDefaultCatalogName
in interface Database
getDefaultCatalogName
in class AbstractJdbcDatabase
public String getDateLiteral(String isoDate)
Returns an Oracle date literal with the same value as a string formatted using ISO 8601.
Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS')
Implementation restriction:
Currently, only the following subsets of ISO8601 are supported:
getDateLiteral
in interface Database
getDateLiteral
in class AbstractJdbcDatabase
public boolean isSystemObject(DatabaseObject example)
isSystemObject
in interface Database
isSystemObject
in class AbstractJdbcDatabase
public boolean supportsTablespaces()
public boolean supportsAutoIncrement()
supportsAutoIncrement
in interface Database
supportsAutoIncrement
in class AbstractJdbcDatabase
public boolean supportsRestrictForeignKeys()
supportsRestrictForeignKeys
in interface Database
supportsRestrictForeignKeys
in class AbstractJdbcDatabase
public int getDataTypeMaxParameters(String dataTypeName)
getDataTypeMaxParameters
in interface Database
getDataTypeMaxParameters
in class AbstractJdbcDatabase
public boolean jdbcCallsCatalogsSchemas()
jdbcCallsCatalogsSchemas
in class AbstractJdbcDatabase
public String generateDatabaseFunctionValue(DatabaseFunction databaseFunction)
Database
generateDatabaseFunctionValue
in interface Database
generateDatabaseFunctionValue
in class AbstractJdbcDatabase
databaseFunction
- database function to check.public ValidationErrors validate()
validate
in interface Database
validate
in class AbstractJdbcDatabase
public String getDbaRecycleBinWarning()
public boolean canAccessDbaRecycleBin()
public boolean supportsNotNullConstraintNames()
Database
supportsNotNullConstraintNames
in interface Database
supportsNotNullConstraintNames
in class AbstractJdbcDatabase
public boolean isValidOracleIdentifier(String identifier, Class<? extends DatabaseObject> type)
public int getIdentifierMaximumLength()
Copyright © 2019 Liquibase.org. All rights reserved.