Class DB2iDialect
- All Implemented Interfaces:
CheckConstraintSupport, ForeignKeySupport, IdentifierSupport, KeywordSupport, LiteralSupport, AlterTableSupport, ColumnDefinitionSupport, ConstraintControlSupport, IndexDdlSupport, TableCreationSupport, TruncateSupport, CurrentTemporalSupport, TemporalFormatSupport, TemporalOperationSupport, ConversionContext
-
Field Summary
FieldsFields inherited from class Dialect
LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGYFields inherited from interface ConstraintControlSupport
NONEFields inherited from interface TruncateSupport
STANDARD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LockingSupportcreateCommand(IndexDdlRequest request) Creates the JDBC mutation operation for an optional-table update.createTail(IndexDdlRequest request) DB2 LUW VersionSupply the stable profile describing immediate retrieval of arbitrary database-generated values for this Dialect.Supply the stable identity-column DDL, insert syntax, and identity-specific retrieval behavior for this Dialect.Supplies execution-time pagination for already-rendered SQL requested byQuery.setMaxResults(int)orQuery.setFirstResult(int).protected DatabaseVersionGet the version of the SQL dialect that is the minimum supported by this implementation.The more "standard" syntax isrid_bit(alias)but here we usealias.rowid.Supply the strategy Hibernate uses to discover existing database sequences and their metadata.No support for sequences.Supply the factory for this Dialect's single-use SQL AST translators.voidinitializeFunctionRegistry(FunctionContributions functionContributions) Contribute the database-specific function descriptors after independent function contributors have run.Methods inherited from class DB2Dialect
alterColumnType, appendBinaryLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendDefinition, appendFormat, buildIdentifierHelper, buildSQLExceptionConversionDelegate, castPattern, causesRollback, columnType, constraintControlMode, contributeDefaultProperties, contributeTypes, createUniqueDelegate, determineDatabaseVersion, determinFullDatabaseVersion, disableConstraintCommands, enableConstraintCommands, extractPattern, fractionalSecondPrecisionInNanos, getAggregateSupport, getCallableStatementSupport, getCteSupport, getCurrentTemporalSupport, getCurrentTimestampSelection, getDirectJavaTimeJdbcSupport, getDmlTargetColumnQualifierSupport, getExpressionCoercionSupport, getGlobalTemporaryTableStrategy, getIfExistsSupport, getJdbcMetadataOverrides, getLockingSupport, getMaxIdentifierLength, getMaximumSeriesSize, getMultiTableMutationSupport, getMutationSyntaxSupport, getNamespaceSupport, getNullOrderingSupport, getParameterLimits, getPredicateSupport, getPreferredSqlTypeCodeForArray, getRefCursorSupportFactory, getRowLevelSecurity, getRowValueSupport, getSchemaCommentSupport, getSchemaDropSupport, getSelectClauseNullString, getSingleRowTableSupport, getSubquerySupport, getTableExporter, getTemporalFormatSupport, getTemporalOperationSupport, getTemporalTableSupport, getTemporalValueSemantics, getTupleCountSupport, getTypeSizingProfile, getUniqueDelegate, getUserDefinedTypeExporter, getValuesListSupport, getViolatedConstraintNameExtractor, getWindowFunctionSupport, parseVersion, registerColumnTypes, registerJsonFunctions, registerXmlFunctions, renderCommands, selectNullString, supportsNationalizedMethods, supportsUserDefinedTypes, timestampaddPattern, timestampdiffPattern, translateExtractFieldMethods inherited from class Dialect
addPartitionKeyToPrimaryKey, appendArrayLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildStringToBooleanCast, buildStringToBooleanCastDecode, castType, contributeKeywords, defaultScrollMode, equivalentTypes, getAlterTableSupport, getArraySupport, getArrayTypeName, getBatchLoadSizingStrategy, getCatalogSeparator, getCheckConstraintSupport, getColumnAliasExtractor, getColumnDefinitionSupport, getConstraintControlSupport, getDefaultOrdinalityColumnName, getDefaultProperties, getEntityLockingStrategyFactory, getEnumSupport, getFetchClauseSupport, getForeignKeyExporter, getForeignKeySupport, getFunctionalDependencyAnalysisSupport, getIdentifierSupport, getIndexDdlSupport, getIndexExporter, getInformationExtractor, getKeywords, getKeywordSupport, getLiteralSupport, getLobMergeStrategy, getLobSupport, getLocalTemporaryTableStrategy, getLockingClauseStrategy, getLowercaseFunction, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getObjectNullBindingStrategy, getPersistentTemporaryTableStrategy, getPreferredSqlTypeCodeForBoolean, getQueryHintPlacement, getQueryHintString, getQueryHintString, getSchemaNameResolver, getSequenceExporter, getSetOperationSupport, getSetOperatorSqlString, getSizeStrategy, getStringValueSemantics, getSyntheticTableGroupSupport, getTableCleaner, getTableCreationSupport, getTableMigrator, getTemporaryTableExporter, getTimeZoneSupport, getTruncateSupport, getVersion, isJdbcLogWarningsEnabledByDefault, narrowCastType, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeDescriptor, resolveSqlTypeLength, supportsCrossJoin, supportsFilterClause, supportsOrdinalSelectItemReference, throttleDdl, toString, trimPattern, truncateModeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AlterTableSupport
addColumnPrefix, addColumnSuffix, alterTableCommandMethods inherited from interface CheckConstraintSupport
render, supportsMethods inherited from interface ConstraintControlSupport
disableCommands, enableCommandsMethods inherited from interface CurrentTemporalSupport
currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, isCurrentTimestampStable, usesStandardCurrentTimestampFunctionMethods inherited from interface ForeignKeySupport
renderAddConstraint, renderDropConstraint, requiresSelfReferentialForeignKeyNullification, supportsAlterTableConstraints, supportsOnDeleteActionMethods inherited from interface IdentifierSupport
closeQuote, getMaxAliasLength, openQuote, quote, quoteCollation, toQuotedIdentifierMethods inherited from interface IndexDdlSupport
nameQualificationMethods inherited from interface KeywordSupport
acceptsJdbcKeywordMethods inherited from interface LiteralSupport
appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, toBooleanValueStringMethods inherited from interface TableCreationSupport
createTableCommand, requiresViewColumnList, tableCreationOptionsMethods inherited from interface TemporalOperationSupport
translateDurationField
-
Field Details
-
DB2_LUW_VERSION
-
-
Constructor Details
-
DB2iDialect
-
DB2iDialect
public DB2iDialect() -
DB2iDialect
-
-
Method Details
-
buildLockingSupport
- Overrides:
buildLockingSupportin classDB2Dialect
-
initializeFunctionRegistry
@SPI({IMPLEMENT,SUPPLY}) public void initializeFunctionRegistry(FunctionContributions functionContributions) Description copied from class:DialectContribute the database-specific function descriptors after independent function contributors have run.
Override this callback to extend or replace the inherited function set. Invoke
superfirst to retain Hibernate's standard and emulated registrations; omitting it deliberately replaces that set. Mutate the supplied boot-scoped function registry only during this callback, and do not retain the contribution context or registry afterward. Implement an independentFunctionContributorinstead when the contribution is not owned by a Dialect.- Overrides:
initializeFunctionRegistryin classDB2Dialect- Parameters:
functionContributions- the Hibernate-supplied function contribution target- See Also:
-
getMinimumSupportedVersion
Description copied from class:DialectGet the version of the SQL dialect that is the minimum supported by this implementation.This method is called during superclass construction. Implementations must return construction-safe immutable data and must not depend on subclass initialization.
- Overrides:
getMinimumSupportedVersionin classDB2Dialect
-
getDB2Version
Description copied from class:DB2DialectDB2 LUW Version- Overrides:
getDB2Versionin classDB2Dialect
-
createCommand
-
createTail
- Specified by:
createTailin interfaceIndexDdlSupport- Overrides:
createTailin classDB2Dialect
-
getGeneratedValuesSupport
Description copied from class:DialectSupply the stable profile describing immediate retrieval of arbitrary database-generated values for this Dialect.
Override this method to declare native insert or update returning, row-id returning, or JDBC generated-key support for arbitrary generated columns. Identity-only retrieval belongs to
Dialect.getIdentityColumnSupport(), and an ordinary select after mutation is a Hibernate fallback rather than a capability of this profile. Refine a family profile by copying the value returned by the superclass and changing only the differing capabilities.- Overrides:
getGeneratedValuesSupportin classDB2Dialect- Returns:
truebecause we can useselect ... from new table (insert .... )
-
getSequenceSupport
No support for sequences.- Overrides:
getSequenceSupportin classDB2Dialect- Returns:
- the non-null sequence-support strategy
- See Also:
-
getSequenceInformationExtractor
Description copied from class:DialectSupply the strategy Hibernate uses to discover existing database sequences and their metadata.
Return
SequenceInformationExtractors.none()when the database version does not expose sequence metadata. Configure ordinary single-query extraction withSequenceInformationExtractors.builder(String), and implementSequenceInformationExtractordirectly only for a genuinely multi-stage algorithm.- Overrides:
getSequenceInformationExtractorin classDB2Dialect- See Also:
-
getLimitHandler
Description copied from class:DialectSupplies execution-time pagination for already-rendered SQL requested by
Query.setMaxResults(int)orQuery.setFirstResult(int).This is distinct from SQL AST
PaginationRenderingSupport, which handles offset and fetch clauses represented in the semantic tree. A custom Dialect should normally return a stockLimitHandleror extend a supported handler family. The returned handler may be reused concurrently and must not retain per-query state.- Overrides:
getLimitHandlerin classDB2Dialect- Returns:
- a non-null handler
-
getIdentityColumnSupport
Description copied from class:DialectSupply the stable identity-column DDL, insert syntax, and identity-specific retrieval behavior for this Dialect.
Override this method to supply a provider implementation of
IdentityColumnSupport. Prefer extendingIdentityColumnSupportBaseand return the same immutable or otherwise stable support instance on every invocation. Do not construct Hibernate mutation delegates in this supply point.- Overrides:
getIdentityColumnSupportin classDB2Dialect
-
createOptionalTableUpdateOperation
@SPI({USE,IMPLEMENT,SUPPLY}) public MutationOperation createOptionalTableUpdateOperation(OptionalTableUpdateOperationRequest request) Description copied from class:DialectCreates the JDBC mutation operation for an optional-table update.
Override this factory when the database needs an operation other than the standard update-then-insert behavior. The request contains the semantic update and bootstrap services; implementations must return an operation for the same
OptionalTableUpdateOperationRequest.mutationTarget()and must not retain the request.- Overrides:
createOptionalTableUpdateOperationin classDB2Dialect- Returns:
- a non-null operation for the supplied optional-table update
- See Also:
-
getSqlAstTranslatorFactory
Description copied from class:DialectSupply the factory for this Dialect's single-use SQL AST translators.
Return
nullto useStandardSqlAstTranslatorFactory. A custom Dialect should normally return a reusable factory derived from that class and create translators derived fromAbstractSqlAstTranslatoror an appropriate supported family base. The factory must not retain translation requests, and every translator it returns is used for one translation.- Overrides:
getSqlAstTranslatorFactoryin classDB2Dialect- See Also:
-
getRowIdSupport
Description copied from class:DB2DialectThe more "standard" syntax isrid_bit(alias)but here we usealias.rowid.There is also an alternative
rid()of typebigint, but it cannot be used with partitioning.- Overrides:
getRowIdSupportin classDB2Dialect- Returns:
- the stable non-null row-id strategy
- See Also:
-