Class OracleLegacyDialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.community.dialect.OracleLegacyDialect
- All Implemented Interfaces:
org.hibernate.boot.model.FunctionContributor, org.hibernate.boot.model.TypeContributor, org.hibernate.exception.spi.ConversionContext
public class OracleLegacyDialect
extends org.hibernate.dialect.Dialect
A SQL dialect for Oracle 8i and above.
-
Nested Class Summary
Nested classes/interfaces declared in class org.hibernate.dialect.Dialect
org.hibernate.dialect.Dialect.SizeStrategy, org.hibernate.dialect.Dialect.SizeStrategyImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final booleanprotected final intprotected final intprotected final booleanstatic final StringFields declared in class org.hibernate.dialect.Dialect
CLOSED_QUOTE, FALSE_STRING_VALUES, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY, TRUE_STRING_VALUES -
Constructor Summary
ConstructorsConstructorDescriptionOracleLegacyDialect(org.hibernate.dialect.DatabaseVersion version) OracleLegacyDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info) OracleLegacyDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info, org.hibernate.dialect.OracleServerConfiguration serverConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionappendCheckConstraintOptions(org.hibernate.mapping.CheckConstraint checkConstraint, String sqlCheckConstraint) org.hibernate.engine.jdbc.env.spi.IdentifierHelperbuildIdentifierHelper(org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder builder, DatabaseMetaData metadata) castPattern(org.hibernate.query.sqm.CastType from, org.hibernate.query.sqm.CastType to) Oracle doesn't have any sort ofTypes.BOOLEANtype orTypes.TIMEtype, and its default behavior for casting dates and timestamps to and from strings is just awful.static org.hibernate.dialect.ReplacerdatetimeFormat(String format, boolean useFm, boolean resetFm) extractPattern(org.hibernate.query.common.TemporalUnit unit) Oracle supports a limited list of temporal fields in the extract() function, but we can emulate some of them by using to_char() with a format string instead of extract().longWe minimize multiplicative factors by using seconds (with fractional part) as the "native" precision for duration arithmetic.org.hibernate.dialect.temptable.TemporaryTableStrategyorg.hibernate.dialect.temptable.TemporaryTableStrategyprotected intOracle doesn't support thegenerate_seriesfunction orlateralrecursive CTEs, so it has to be emulated with a top level recursive CTE which requires an upper bound on the amount of elements that the series can return.getReadLockString(int timeout) getReadLockString(String aliases, int timeout) getSelectClauseNullString(int sqlType, org.hibernate.type.spi.TypeConfiguration typeConfiguration) org.hibernate.dialect.temptable.TemporaryTableKindgetWriteLockString(int timeout) getWriteLockString(String aliases, int timeout) booleanbooleanbooleanbooleanOracle has neitherBITnorBOOLEAN.booleanuseFollowOnLocking(String sql, org.hibernate.query.spi.QueryOptions queryOptions) For Oracle, the FOR UPDATE clause cannot be applied when using ORDER BY, DISTINCT or views.Methods declared in class org.hibernate.dialect.Dialect
addPartitionKeyToPrimaryKey, addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildSQLExceptionConversionDelegate, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castType, checkVersion, closeQuote, columnType, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getBeforeDropStatement, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getCurrentTimestampSelectString, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getDual, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFromDualForSelectOnly, getFunctionalDependencyAnalysisSupport, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIdentityColumnSupport, getIndexExporter, getInExpressionCountLimit, getInformationExtractor, getKeywords, getLimitHandler, getLobMergeStrategy, getLockingClauseStrategy, getLockingStrategy, getLockingStrategy, getLockingSupport, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMaxVarcharLength, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSizeStrategy, getSqlAstTranslatorFactory, getSqmTranslatorFactory, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, initializeFunctionRegistry, isCurrentTimestampSelectStringCallable, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, openQuote, ordinal, prependComment, qualifyIndexName, quote, quoteCollation, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeDescriptor, resolveSqlTypeLength, rowId, rowIdSqlType, stripsTrailingSpacesFromChar, supportsAlterColumnType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsCurrentTimestampSelection, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNamedParameters, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOffsetInSubquery, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPartitionBy, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, supportsWithClause, supportsWithClauseInSubquery, timestampaddPattern, timestampdiffPattern, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
Field Details
-
PREFER_LONG_RAW
- See Also:
-
autonomous
protected final boolean autonomous -
extended
protected final boolean extended -
applicationContinuity
protected final boolean applicationContinuity -
driverMajorVersion
protected final int driverMajorVersion -
driverMinorVersion
protected final int driverMinorVersion
-
-
Constructor Details
-
OracleLegacyDialect
public OracleLegacyDialect() -
OracleLegacyDialect
public OracleLegacyDialect(org.hibernate.dialect.DatabaseVersion version) -
OracleLegacyDialect
public OracleLegacyDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info) -
OracleLegacyDialect
public OracleLegacyDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info, org.hibernate.dialect.OracleServerConfiguration serverConfiguration)
-
-
Method Details
-
isAutonomous
public boolean isAutonomous() -
isExtended
public boolean isExtended() -
isApplicationContinuity
public boolean isApplicationContinuity() -
getMaximumSeriesSize
protected int getMaximumSeriesSize()Oracle doesn't support thegenerate_seriesfunction orlateralrecursive CTEs, so it has to be emulated with a top level recursive CTE which requires an upper bound on the amount of elements that the series can return. -
castPattern
public String castPattern(org.hibernate.query.sqm.CastType from, org.hibernate.query.sqm.CastType to) Oracle doesn't have any sort ofTypes.BOOLEANtype orTypes.TIMEtype, and its default behavior for casting dates and timestamps to and from strings is just awful.- Overrides:
castPatternin classorg.hibernate.dialect.Dialect
-
getFractionalSecondPrecisionInNanos
public long getFractionalSecondPrecisionInNanos()We minimize multiplicative factors by using seconds (with fractional part) as the "native" precision for duration arithmetic.- Overrides:
getFractionalSecondPrecisionInNanosin classorg.hibernate.dialect.Dialect
-
extractPattern
Oracle supports a limited list of temporal fields in the extract() function, but we can emulate some of them by using to_char() with a format string instead of extract(). Thus, the additional supported fields areTemporalUnit.DAY_OF_YEAR,TemporalUnit.DAY_OF_MONTH,TemporalUnit.DAY_OF_YEAR, andTemporalUnit.WEEK.- Overrides:
extractPatternin classorg.hibernate.dialect.Dialect
-
supportsBitType
public boolean supportsBitType()Oracle has neitherBITnorBOOLEAN.- Overrides:
supportsBitTypein classorg.hibernate.dialect.Dialect- Returns:
- false
-
getNativeValueGenerationStrategy
- Overrides:
getNativeValueGenerationStrategyin classorg.hibernate.dialect.Dialect
-
getSelectClauseNullString
public String getSelectClauseNullString(int sqlType, org.hibernate.type.spi.TypeConfiguration typeConfiguration) - Overrides:
getSelectClauseNullStringin classorg.hibernate.dialect.Dialect
-
getLocalTemporaryTableStrategy
public org.hibernate.dialect.temptable.TemporaryTableStrategy getLocalTemporaryTableStrategy()- Overrides:
getLocalTemporaryTableStrategyin classorg.hibernate.dialect.Dialect
-
getGlobalTemporaryTableStrategy
public org.hibernate.dialect.temptable.TemporaryTableStrategy getGlobalTemporaryTableStrategy()- Overrides:
getGlobalTemporaryTableStrategyin classorg.hibernate.dialect.Dialect
-
getSupportedTemporaryTableKind
public org.hibernate.dialect.temptable.TemporaryTableKind getSupportedTemporaryTableKind()- Overrides:
getSupportedTemporaryTableKindin classorg.hibernate.dialect.Dialect
-
getTemporaryTableCreateOptions
- Overrides:
getTemporaryTableCreateOptionsin classorg.hibernate.dialect.Dialect
-
useFollowOnLocking
For Oracle, the FOR UPDATE clause cannot be applied when using ORDER BY, DISTINCT or views.- Overrides:
useFollowOnLockingin classorg.hibernate.dialect.Dialect- See Also:
-
getCurrentSchemaCommand
- Overrides:
getCurrentSchemaCommandin classorg.hibernate.dialect.Dialect
-
getWriteLockString
- Overrides:
getWriteLockStringin classorg.hibernate.dialect.Dialect
-
getWriteLockString
-
getReadLockString
- Overrides:
getReadLockStringin classorg.hibernate.dialect.Dialect
-
getReadLockString
-
datetimeFormat
public static org.hibernate.dialect.Replacer datetimeFormat(String format, boolean useFm, boolean resetFm) -
buildIdentifierHelper
public org.hibernate.engine.jdbc.env.spi.IdentifierHelper buildIdentifierHelper(org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder builder, DatabaseMetaData metadata) throws SQLException - Overrides:
buildIdentifierHelperin classorg.hibernate.dialect.Dialect- Throws:
SQLException
-
appendCheckConstraintOptions
-