Class DB2zDialect
- All Implemented Interfaces:
CheckConstraintSupport, ForeignKeySupport, IdentifierSupport, KeywordSupport, LiteralSupport, AlterTableSupport, ColumnDefinitionSupport, ConstraintControlSupport, IndexDdlSupport, TableCreationSupport, TruncateSupport, CurrentTemporalSupport, TemporalFormatSupport, TemporalOperationSupport, ConversionContext
- "Db2 UDB for z/OS", and
- "Db2 UDB for z/OS and OS/390".
-
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 LockingSupportprotected StringcolumnType(int sqlTypeCode) createCommand(IndexDdlRequest request) Creates the JDBC mutation operation for an optional-table update.createTail(IndexDdlRequest request) DB2 LUW VersionSupply 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.Supplies the complete sequence value-expression and lifecycle-DDL strategy for this Dialect.Supply the factory for this Dialect's single-use SQL AST translators.Supply extraction and timestamp-arithmetic syntax.Select the database's support profile for SQLwith time zonetypes.The contexts in which this Dialect supports native multi-rowvaluessyntax.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Return a timestamp-add pattern containing?1,?2, and?3.Methods inherited from class DB2Dialect
alterColumnType, appendBinaryLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendDefinition, appendFormat, buildIdentifierHelper, buildSQLExceptionConversionDelegate, castPattern, causesRollback, constraintControlMode, contributeDefaultProperties, contributeTypes, createUniqueDelegate, determineDatabaseVersion, determinFullDatabaseVersion, disableConstraintCommands, enableConstraintCommands, extractPattern, fractionalSecondPrecisionInNanos, getAggregateSupport, getCallableStatementSupport, getCteSupport, getCurrentTemporalSupport, getCurrentTimestampSelection, getDirectJavaTimeJdbcSupport, getDmlTargetColumnQualifierSupport, getExpressionCoercionSupport, getGeneratedValuesSupport, getGlobalTemporaryTableStrategy, getIfExistsSupport, getJdbcMetadataOverrides, getLockingSupport, getMaxIdentifierLength, getMaximumSeriesSize, getMultiTableMutationSupport, getMutationSyntaxSupport, getNamespaceSupport, getNullOrderingSupport, getParameterLimits, getPredicateSupport, getPreferredSqlTypeCodeForArray, getRefCursorSupportFactory, getRowLevelSecurity, getRowValueSupport, getSchemaCommentSupport, getSchemaDropSupport, getSelectClauseNullString, getSingleRowTableSupport, getSubquerySupport, getTableExporter, getTemporalFormatSupport, getTemporalTableSupport, getTemporalValueSemantics, getTupleCountSupport, getTypeSizingProfile, getUniqueDelegate, getUserDefinedTypeExporter, getViolatedConstraintNameExtractor, getWindowFunctionSupport, initializeFunctionRegistry, parseVersion, registerColumnTypes, registerJsonFunctions, registerXmlFunctions, renderCommands, selectNullString, supportsNationalizedMethods, supportsUserDefinedTypes, 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, 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
extractPattern, fractionalSecondPrecisionInNanos, timestampdiffPattern, translateDurationField, translateExtractField
-
Field Details
-
DB2_LUW_VERSION
-
-
Constructor Details
-
DB2zDialect
-
DB2zDialect
public DB2zDialect() -
DB2zDialect
-
-
Method Details
-
getTemporalOperationSupport
Description copied from class:DialectSupply extraction and timestamp-arithmetic syntax. Return one stable, non-null, thread-safe implementation. Providers may implementTemporalOperationSupportdirectly and returnthis.- Overrides:
getTemporalOperationSupportin classDB2Dialect- See Also:
-
buildLockingSupport
- Overrides:
buildLockingSupportin classDB2Dialect
-
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
-
columnType
Description copied from class:DialectReturn the complete database column declaration pattern for a JDBC
Typesor HibernateSqlTypescode used during type registration.Use only
$l,$p, and$sfor length, precision, and scale. Define distinct mappings for theLONG32codes; the JDBCLONGsynonyms are normalized before this hook. Delegate unknown inherited codes to the superclass so its standard exception remains authoritative.- Overrides:
columnTypein classDB2Dialect
-
getDB2Version
Description copied from class:DB2DialectDB2 LUW Version- Overrides:
getDB2Versionin classDB2Dialect
-
createCommand
- Specified by:
createCommandin interfaceIndexDdlSupport
-
createTail
- Specified by:
createTailin interfaceIndexDdlSupport- Overrides:
createTailin classDB2Dialect
-
getTimeZoneSupport
Description copied from class:DialectSelect the database's support profile for SQL
with time zonetypes.Override this method to report whether the database preserves the original zone, normalizes values to UTC, or has no native support. This value participates in mapping and JDBC type selection; it does not control temporal-literal syntax.
- Overrides:
getTimeZoneSupportin classDialect- Returns:
- the database time-zone type support profile
- See Also:
-
getSequenceSupport
Description copied from class:DialectSupplies the complete sequence value-expression and lifecycle-DDL strategy for this Dialect.
Return the same stable, thread-safe strategy for the Dialect's lifetime. Use
SequenceSupports.none()when sequences are unsupported, select one of the other stock strategies only when its complete grammar matches the database, or supply a provider implementation ofSequenceSupport.- 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
-
timestampaddPattern
@SPI({USE,IMPLEMENT}) public String timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Description copied from interface:TemporalOperationSupportReturn a timestamp-add pattern containing?1,?2, and?3.- Specified by:
timestampaddPatternin interfaceTemporalOperationSupport- Overrides:
timestampaddPatternin 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:
-
getValuesListSupport
Description copied from class:DialectThe contexts in which this Dialect supports native multi-row
valuessyntax.The returned immutable profile must be non-null and stable for the lifetime of this Dialect. Report only native syntax support; translator emulation is selected separately.
- Overrides:
getValuesListSupportin classDB2Dialect
-