Class SpannerDialect
- All Implemented Interfaces:
CheckConstraintSupport, ForeignKeySupport, IdentifierSupport, KeywordSupport, LiteralSupport, AlterTableSupport, ColumnDefinitionSupport, ConstraintControlSupport, IndexDdlSupport, TableCreationSupport, TruncateSupport, CurrentTemporalSupport, TemporalFormatSupport, TemporalOperationSupport, ConversionContext
-
Field Summary
Fields 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 TypeMethodDescriptionvoidappendBinaryLiteral(SqlAppender appender, byte[] bytes) Append a SQL binary literal.voidappendBooleanValueString(SqlAppender appender, boolean bool) Append a SQL Boolean literal expression.voidappendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal for ajava.timevalue.voidappendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal for aCalendarvalue.voidappendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal for a legacyDatevalue.voidappendDefinition(SqlAppender appender, ColumnDefinitionRequest request) voidappendFormat(SqlAppender appender, String format) Append the database translation of the supplied Hibernate format pattern.voidappendLiteral(SqlAppender appender, String literal) Append a SQL string literal.Build and supply the configured identifier helper from the stable JDBC metadata snapshot and selected keyword strategy.Supplies vendor-specific SQL-exception conversion for this Dialect.castPattern(CastType from, CastType to) Obtain a pattern for the SQL equivalent to acast()function call.protected StringcastType(int sqlTypeCode) Return the complete cast-target type pattern forsqlTypeCode.booleancausesRollback(SQLException sqlException) Determine whether this database marks the current transaction for rollback after the given statement failure.charReturn the character which closes a quoted identifier.protected StringcolumnType(int sqlTypeCode) protected voidcontributeDefaultProperties(Properties properties) Contribute provider configuration defaults after Dialect construction.voidcontributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Contribute database-specific Java, JDBC, DDL, and basic type descriptors.createCommand(IndexDdlRequest request) Creates the JDBC mutation operation for an optional-table update.Render the current SQL time expression used forjava.sql.Time.static ReplacerdatetimeFormat(String format) A defaultScrollModeto be used byQuery.scroll().The independent array syntax and multi-valued parameter-binding behavior of this Dialect.getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength) Render an array type name from the independent Java element name, rendered SQL element name, and optional maximum length.The common-table-expression capabilities of this Dialect.Supply current temporal expressions and database-side timestamp retrieval.Select the JDBC command used for database-side current timestamp retrieval, or returnnullwhen the database offers no supported command.Supply direct JDBC access capabilities for Java Time classes.The qualifier form accepted for target-column references in update and delete statements.Supply the stable identity-column DDL, insert syntax, and identity-specific retrieval behavior for this Dialect.Supply existence-check placement for schema DDL targets.Supplies execution-time pagination for already-rendered SQL requested byQuery.setMaxResults(int)orQuery.setFirstResult(int).getLockingClauseStrategy(QuerySpec querySpec, LockOptions lockOptions) Supplies the per-translation strategy for a statement-level [PessimisticLockStyle#CLAUSE locking clause].Supplies the cohesive pessimistic-locking profile for this Dialect.The native SQL mutation-syntax capabilities of this Dialect.Supply catalog and schema lifecycle behavior to schema tooling.Supply the semantic identifier-generation type used for native generation.Supply the database's default null ordering and explicit null-precedence syntax capabilities.The native row-value syntax of this Dialect.Supply the strategy which resolves the current schema for a JDBC connection.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.getSetOperatorSqlString(SetOperator operator) Get the SQL string representation for a specific set operator (UNION, INTERSECT, EXCEPT).Supply the SQL renderings used for a reusable single-row table and for an otherwise table-less select.Supply the factory for this Dialect's single-use SQL AST translators.Supplies the database's supported subquery placements.Supply the exporter used to create and drop relational tables.Supply datetime-format translation.Supply extraction and timestamp-arithmetic syntax.Supply temporal precision-adjustment and literal-offset semantics.Supplies the database syntax for ordinary and distinct tuple counts.Supplies this Dialect's resolved type-sizing limits and defaults.Supply the stable strategy used for unique-key representation and DDL.voidinitializeFunctionRegistry(FunctionContributions functionContributions) Contribute the database-specific function descriptors after independent function contributors have run.charReturn the character which opens a quoted identifier.protected voidregisterColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Register the inherited ANSI-oriented DDL type descriptors during Dialect type contribution.renderCommands(TruncateRequest request) resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, JdbcTypeRegistry jdbcTypeRegistry) Resolve the non-null JDBC descriptor for result-set metadata.booleansupports(CheckConstraintPlacement placement) timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Return a timestamp-add pattern containing?1,?2, and?3.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Return a timestamp-difference pattern containing?1,?2, and?3.Translate an extraction field name.trimPattern(TrimSpec specification, boolean isWhitespace) Obtain a pattern for the SQL equivalent to atrim()function call.booleanMethods inherited from class Dialect
addPartitionKeyToPrimaryKey, appendArrayLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildStringToBooleanCast, buildStringToBooleanCastDecode, constraintControlMode, contributeKeywords, determineDatabaseVersion, equivalentTypes, getAggregateSupport, getAlterTableSupport, getBatchLoadSizingStrategy, getCallableStatementSupport, getCatalogSeparator, getCheckConstraintSupport, getColumnAliasExtractor, getColumnDefinitionSupport, getConstraintControlSupport, getDefaultOrdinalityColumnName, getDefaultProperties, getEntityLockingStrategyFactory, getEnumSupport, getExpressionCoercionSupport, getFetchClauseSupport, getForeignKeyExporter, getForeignKeySupport, getFunctionalDependencyAnalysisSupport, getGeneratedValuesSupport, getGlobalTemporaryTableStrategy, getIdentifierSupport, getIndexDdlSupport, getIndexExporter, getInformationExtractor, getJdbcMetadataOverrides, getKeywords, getKeywordSupport, getLiteralSupport, getLobMergeStrategy, getLobSupport, getLocalTemporaryTableStrategy, getLowercaseFunction, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getMultiTableMutationSupport, getNameQualifierSupport, getNationalizationSupport, getNativeParameterMarkerStrategy, getObjectNullBindingStrategy, getParameterLimits, getPersistentTemporaryTableStrategy, getPredicateSupport, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintPlacement, getQueryHintString, getQueryHintString, getRefCursorSupportFactory, getRowIdSupport, getRowLevelSecurity, getSchemaCommentSupport, getSchemaDropSupport, getSelectClauseNullString, getSequenceExporter, getSetOperationSupport, getSizeStrategy, getStringValueSemantics, getSyntheticTableGroupSupport, getTableCleaner, getTableCreationSupport, getTableMigrator, getTemporalTableSupport, getTemporaryTableExporter, getTimeZoneSupport, getTruncateSupport, getUserDefinedTypeExporter, getValuesListSupport, getVersion, getViolatedConstraintNameExtractor, getWindowFunctionSupport, isJdbcLogWarningsEnabledByDefault, narrowCastType, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeLength, supportsCrossJoin, supportsFilterClause, supportsNationalizedMethods, supportsOrdinalSelectItemReference, supportsUserDefinedTypes, throttleDdl, toString, truncateModeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AlterTableSupport
addColumnPrefix, addColumnSuffix, alterColumnType, alterTableCommandMethods inherited from interface CheckConstraintSupport
renderMethods inherited from interface ConstraintControlSupport
disableCommands, disableConstraintCommands, enableCommands, enableConstraintCommandsMethods inherited from interface CurrentTemporalSupport
currentDate, currentLocalTime, currentLocalTimestamp, currentTimestamp, currentTimestampWithTimeZone, isCurrentTimestampStable, usesStandardCurrentTimestampFunctionMethods inherited from interface ForeignKeySupport
renderDropConstraint, requiresSelfReferentialForeignKeyNullification, supportsAlterTableConstraints, supportsOnDeleteActionMethods inherited from interface IdentifierSupport
getMaxAliasLength, getMaxIdentifierLength, quote, quoteCollation, toQuotedIdentifierMethods inherited from interface IndexDdlSupport
createTailMethods inherited from interface KeywordSupport
acceptsJdbcKeywordMethods inherited from interface LiteralSupport
appendIntervalLiteral, appendIntervalLiteral, appendUUIDLiteral, toBooleanValueStringMethods inherited from interface TableCreationSupport
createTableCommand, requiresViewColumnList, tableCreationOptionsMethods inherited from interface TemporalOperationSupport
extractPattern, fractionalSecondPrecisionInNanos, translateDurationField
-
Constructor Details
-
SpannerDialect
public SpannerDialect() -
SpannerDialect
-
-
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 classDialect- See Also:
-
getTemporalFormatSupport
Description copied from class:DialectSupply datetime-format translation. Return one stable, non-null, thread-safe implementation.- Overrides:
getTemporalFormatSupportin classDialect- See Also:
-
getCurrentTemporalSupport
Description copied from class:DialectSupply current temporal expressions and database-side timestamp retrieval. Return one stable, non-null, thread-safe implementation. Providers may implementCurrentTemporalSupportdirectly and returnthis.- Overrides:
getCurrentTemporalSupportin classDialect- See Also:
-
getTypeSizingProfile
Description copied from class:DialectSupplies this Dialect's resolved type-sizing limits and defaults.
Return
TypeSizingProfile.STANDARDwhen no dimension differs. Construct one stable immutable profile after version and server configuration are known. A family Dialect may copy its superclass profile, but must set every effective dimension which formerly changed through scalar-method delegation because profile builder setters do not cascade.- Overrides:
getTypeSizingProfilein classDialect
-
useIntegerForPrimaryKey
public boolean useIntegerForPrimaryKey() -
getDirectJavaTimeJdbcSupport
Description copied from class:DialectSupply direct JDBC access capabilities for Java Time classes. Return one stable, non-null, thread-safe implementation.- Overrides:
getDirectJavaTimeJdbcSupportin classDialect- Returns:
- the direct Java Time JDBC support for this Dialect and driver
- See Also:
-
contributeTypes
@SPI({IMPLEMENT,SUPPLY}) public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Description copied from class:DialectContribute database-specific Java, JDBC, DDL, and basic type descriptors.
Override this method when the database or JDBC driver requires descriptors beyond the inherited registrations. Invoke
superfirst unless the Dialect intentionally replaces the complete inherited contribution protocol. Obtain reusable dialect-specific JDBC descriptors from the family facades inorg.hibernate.dialect.type.spi, and preserve whether a descriptor replaces an existing registration or is added only when absent.- Overrides:
contributeTypesin classDialect- Parameters:
typeContributions- the Hibernate-supplied contribution registryserviceRegistry-the Hibernate-supplied services, including class loading used by driver-backed descriptor factories
Mutate the supplied boot-scoped registries only during this callback and do not retain the contribution context or a mutable registry afterward. Implement an independent
TypeContributorinstead when the contribution is not owned by a Dialect.
-
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 classDialect- Returns:
- a non-null operation for the supplied optional-table update
- See Also:
-
contributeDefaultProperties
Description copied from class:DialectContribute provider configuration defaults after Dialect construction.
Invoke
superfirst to extend the inherited defaults. Omittingsuperdeliberately replaces them. Mutate the supplied isolated property bag only during this callback; do not retain it or callDialect.getDefaultProperties()from a Dialect constructor.- Overrides:
contributeDefaultPropertiesin classDialect- Parameters:
properties- the isolated contribution target
-
resolveSqlTypeDescriptor
@SPI({USE,IMPLEMENT}) public JdbcType resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, JdbcTypeRegistry jdbcTypeRegistry) Description copied from class:DialectResolve the non-null JDBC descriptor for result-set metadata.
Preserve vendor replacement and array-component resolution, and delegate unmatched codes to
jdbcTypeRegistry.- Overrides:
resolveSqlTypeDescriptorin classDialect
-
registerColumnTypes
@SPI({IMPLEMENT,SUPPLY}) protected void registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Description copied from class:DialectRegister the inherited ANSI-oriented DDL type descriptors during Dialect type contribution.
Override this focused sub-hook to extend or replace column type registrations. Invoke
superfirst to retain the inherited descriptor set; omitting it deliberately replaces that set. Mutate the supplied boot-scoped registry only during this callback, and do not retain the contribution context or registry afterward. Implement an independentTypeContributorinstead when the contribution is not owned by a Dialect.- Overrides:
registerColumnTypesin classDialect- Parameters:
typeContributions- the Hibernate-supplied contribution targetserviceRegistry- the Hibernate-supplied bootstrap services- See Also:
-
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 classDialect
-
castPattern
Description copied from class:DialectObtain a pattern for the SQL equivalent to acast()function call. The resulting pattern must contain ?1 and ?2 placeholders for the arguments.- Overrides:
castPatternin classDialect- Parameters:
from- aCastTypeindicating the type of the value argumentto- aCastTypeindicating the type the value argument is cast to
-
castType
Description copied from class:DialectReturn the complete cast-target type pattern for
sqlTypeCode.Override this hook when cast syntax differs from column declaration syntax; otherwise delegate to
Dialect.columnType(int). -
getArraySupport
Description copied from class:DialectThe independent array syntax and multi-valued parameter-binding behavior of this Dialect.
Override this method to supply standard element-type array support, SQL array-constructor support, and the multi-valued parameter-binding strategy. Treat these as independent dimensions: do not infer syntax support from array binding, and do not infer array binding from either syntax capability. Return one immutable, non-null profile whose values remain stable for the lifetime of this Dialect.
- Overrides:
getArraySupportin classDialect- Returns:
- this Dialect's stable array-support profile
-
getArrayTypeName
@SPI({USE,IMPLEMENT}) public String getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength) Description copied from class:DialectRender an array type name from the independent Java element name, rendered SQL element name, and optional maximum length.
Return null when array types are unsupported. The standard forms are
element arrayandelement array[length].- Overrides:
getArrayTypeNamein classDialect
-
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 classDialect- Parameters:
functionContributions- the Hibernate-supplied function contribution target- 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 classDialect- See Also:
-
getIfExistsSupport
Description copied from class:DialectSupply existence-check placement for schema DDL targets.
Return one immutable profile for this Dialect's lifetime.
- Overrides:
getIfExistsSupportin classDialect- See Also:
-
getCurrentTimestampSelection
Description copied from interface:CurrentTemporalSupportSelect the JDBC command used for database-side current timestamp retrieval, or returnnullwhen the database offers no supported command.- Specified by:
getCurrentTimestampSelectionin interfaceCurrentTemporalSupport- See Also:
-
appendBooleanValueString
Description copied from interface:LiteralSupportAppend a SQL Boolean literal expression.- Specified by:
appendBooleanValueStringin interfaceLiteralSupport
-
appendBinaryLiteral
Description copied from interface:LiteralSupportAppend a SQL binary literal.- Specified by:
appendBinaryLiteralin interfaceLiteralSupport
-
appendLiteral
Description copied from interface:LiteralSupportAppend a SQL string literal.- Specified by:
appendLiteralin interfaceLiteralSupport
-
currentTime
Description copied from interface:CurrentTemporalSupportRender the current SQL time expression used forjava.sql.Time.- Specified by:
currentTimein interfaceCurrentTemporalSupport
-
getTemporalValueSemantics
Description copied from class:DialectSupply temporal precision-adjustment and literal-offset semantics. Return one stable, non-null immutable profile.- Overrides:
getTemporalValueSemanticsin classDialect- See Also:
-
appendDateTimeLiteral
@SPI({USE,IMPLEMENT}) public void appendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal for a
java.timevalue.Preserve the value's offset only when the Dialect's temporal-value semantics permit it. Append immediately and retain no invocation state.
- Specified by:
appendDateTimeLiteralin interfaceLiteralSupport- Overrides:
appendDateTimeLiteralin classDialect
-
appendDateTimeLiteral
@SPI({USE,IMPLEMENT}) public void appendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal for a legacy
Datevalue.Apply the supplied JDBC time zone where required, append immediately, and retain no invocation state.
- Specified by:
appendDateTimeLiteralin interfaceLiteralSupport- Overrides:
appendDateTimeLiteralin classDialect
-
appendDateTimeLiteral
@SPI({USE,IMPLEMENT}) public void appendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal for a
Calendarvalue.Preserve Calendar-specific time-zone and millisecond semantics, append immediately, and retain no invocation state.
- Specified by:
appendDateTimeLiteralin interfaceLiteralSupport- Overrides:
appendDateTimeLiteralin classDialect
-
translateExtractField
Description copied from interface:TemporalOperationSupportTranslate an extraction field name.- Specified by:
translateExtractFieldin interfaceTemporalOperationSupport
-
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
-
timestampdiffPattern
@SPI({USE,IMPLEMENT}) public String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Description copied from interface:TemporalOperationSupportReturn a timestamp-difference pattern containing?1,?2, and?3.- Specified by:
timestampdiffPatternin interfaceTemporalOperationSupport
-
appendFormat
Description copied from interface:TemporalFormatSupportAppend the database translation of the supplied Hibernate format pattern.- Specified by:
appendFormatin interfaceTemporalFormatSupport
-
datetimeFormat
-
trimPattern
Description copied from class:DialectObtain a pattern for the SQL equivalent to atrim()function call. The resulting pattern must contain a ?1 placeholder for the argument of typeStringand a ?2 placeholder for the trim character ifisWhitespacewas false.- Overrides:
trimPatternin classDialect- Parameters:
specification- leading, trailing, or bothisWhitespace-trueif trimming whitespace, and the ?2 placeholder for the trim character should be omitted,falseif the trim character is explicit and the ?2 placeholder must be included in the pattern
-
getTableExporter
Description copied from class:DialectSupply the exporter used to create and drop relational tables.
Return one stable exporter owned by this Dialect. Prefer
StandardTableExporterwhen only its focused table-DDL template hooks are needed.- Overrides:
getTableExporterin classDialect
-
supports
- Specified by:
supportsin interfaceCheckConstraintSupport
-
createCommand
- Specified by:
createCommandin interfaceIndexDdlSupport
-
getUniqueDelegate
Description copied from class:DialectSupply the stable strategy used for unique-key representation and DDL.
Return a stock profile from
UniqueDelegates, or a stable provider-owned implementation or decorator. Do not import a Hibernate.internalleaf.- Overrides:
getUniqueDelegatein classDialect- See Also:
-
renderAddConstraint
- Specified by:
renderAddConstraintin interfaceForeignKeySupport
-
appendDefinition
@SPI({USE,IMPLEMENT}) public void appendDefinition(SqlAppender appender, ColumnDefinitionRequest request) - Specified by:
appendDefinitionin interfaceColumnDefinitionSupport
-
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 classDialect
-
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 classDialect- 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 classDialect- See Also:
-
getNativeValueGenerationStrategy
Description copied from class:DialectSupply the semantic identifier-generation type used for native generation.
Return a non-null typed value instead of a legacy generator name or implementation class. The inherited implementation selects
GenerationType.IDENTITYwhen this Dialect'sIdentityColumnSupportsupports identity columns andGenerationType.SEQUENCEotherwise. Override it when the database's native choice differs from that rule.Legacy
"native"mappings andNativeGeneratorconsume this same provider decision.- Overrides:
getNativeValueGenerationStrategyin classDialect- Returns:
- the non-null semantic native identifier-generation type
- See Also:
-
getNamespaceSupport
Description copied from class:DialectSupply catalog and schema lifecycle behavior to schema tooling.
Return one stable, non-null strategy. Prefer a complete immutable profile from
NamespaceSupports, and implementNamespaceSupportdirectly only for custom or multi-command namespace SQL.- Overrides:
getNamespaceSupportin classDialect- See Also:
-
getSchemaNameResolver
Description copied from class:DialectSupply the strategy which resolves the current schema for a JDBC connection.
Return a stable, non-null resolver. Use the default resolver unless the driver cannot implement
Connection.getSchema()correctly.- Overrides:
getSchemaNameResolverin classDialect- See Also:
-
nameQualification
- Specified by:
nameQualificationin interfaceIndexDdlSupport
-
getLockingSupport
Description copied from class:DialectSupplies the cohesive pessimistic-locking profile for this Dialect.
The profile coordinates capability metadata, statement-clause rendering, table hints, already-rendered SQL rewriting, connection timeout handling, and follow-on locking. A custom Dialect should supply one internally consistent profile instead of overriding those behaviors independently. The returned support must be non-null and stable for the Dialect lifetime; its components may be reused concurrently and must not retain per-query requests.
- Overrides:
getLockingSupportin classDialect- See Also:
-
getLockingClauseStrategy
Description copied from class:DialectSupplies the per-translation strategy for a statement-level [PessimisticLockStyle#CLAUSE locking clause].- Overrides:
getLockingClauseStrategyin classDialect- See Also:
-
getSubquerySupport
Description copied from class:DialectSupplies the database's supported subquery placements.
Return one non-null, immutable profile whose values remain stable for this Dialect's lifetime. Declare every placement independently. In particular, scalar subqueries in the select list and
existspredicates in the select list are separate capabilities. Lateral spelling and fallback rendering remain translator responsibilities. When refining a family Dialect, start fromSubquerySupport.builder(super.getSubquerySupport())and change only the differing placements.- Overrides:
getSubquerySupportin classDialect- Returns:
- this Dialect's stable subquery-support profile
-
openQuote
Description copied from interface:IdentifierSupportReturn the character which opens a quoted identifier.- Specified by:
openQuotein interfaceIdentifierSupport
-
closeQuote
Description copied from interface:IdentifierSupportReturn the character which closes a quoted identifier.- Specified by:
closeQuotein interfaceIdentifierSupport
-
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 classDialect- Returns:
- a non-null handler
-
getRowValueSupport
Description copied from class:DialectThe native row-value syntax of this Dialect.
Override this method to supply explicit
row(a, b)construction, row equality, ordering, and distinctness comparisons, row-valuedINlists, row-valuedINsubqueries, and quantified row comparisons. Treat each feature as an exact native-syntax declaration: do not inferIN-subquery support fromIN-list support or explicit row construction from comparison support. Copy the superclass profile when refining an inherited Dialect family. Return one immutable, non-null profile whose values remain stable for the lifetime of this Dialect.- Overrides:
getRowValueSupportin classDialect- Returns:
- this Dialect's stable row-value-support profile
-
getDmlTargetColumnQualifierSupport
@SPI({USE,IMPLEMENT,SUPPLY}) public DmlTargetColumnQualifierSupport getDmlTargetColumnQualifierSupport()Description copied from class:DialectThe qualifier form accepted for target-column references in update and delete statements.
Translators use this value when rendering assignments and predicates. A custom Dialect should return the least permissive form required by the database, not a form used only by an emulation.
- Overrides:
getDmlTargetColumnQualifierSupportin classDialect- Returns:
- the non-null target-column qualifier support
- See Also:
-
buildIdentifierHelper
@SPI({USE,IMPLEMENT,SUPPLY}) public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuildRequest request) Description copied from interface:IdentifierSupportBuild and supply the configured identifier helper from the stable JDBC metadata snapshot and selected keyword strategy.
This inherited implementation initializes identifier casing, keywords, and namespace support from the request. Invoke it before replacing any of those values with authoritative provider settings, then build the final helper from the same builder. Settings which this implementation does not initialize may be applied before invoking it. If builder configuration cannot express a database rule, decorate the final helper with
DelegatingIdentifierHelper. Do not retain the request, builder, or metadata view.- Specified by:
buildIdentifierHelperin interfaceIdentifierSupport- See Also:
-
defaultScrollMode
Description copied from class:DialectA defaultScrollModeto be used byQuery.scroll().- Overrides:
defaultScrollModein classDialect- Returns:
- the default
ScrollModeto use.
-
renderCommands
- Specified by:
renderCommandsin interfaceTruncateSupport
-
getSetOperatorSqlString
Description copied from class:DialectGet the SQL string representation for a specific set operator (UNION, INTERSECT, EXCEPT).The default implementation delegates to
SetOperator.sqlString(). Dialects like Cloud Spanner that require explicit 'DISTINCT' keywords can override this.- Overrides:
getSetOperatorSqlStringin classDialect- Parameters:
operator- The set operator- Returns:
- The SQL fragment (e.g., "union", "union all", "union distinct")
-
getSingleRowTableSupport
Description copied from class:DialectSupply the SQL renderings used for a reusable single-row table and for an otherwise table-less select.
Override this method with one stable, non-null profile when either rendering differs from
SingleRowTableSupport.STANDARD. The table expression and the complete select-onlyfromfragment are independent; an empty fragment means that nofromclause is required. Dialect subclasses refining a family profile should copyDialect.getSingleRowTableSupport()from the superclass and change only the values which differ.- Overrides:
getSingleRowTableSupportin classDialect- Returns:
- the stable, non-null single-row-table-support profile
-
getNullOrderingSupport
Description copied from class:DialectSupply the database's default null ordering and explicit null-precedence syntax capabilities.
Override this method with a stable, non-null profile when the database's default null placement differs from
NullOrderingSupport.STANDARD, or when it cannot rendernulls firstandnulls lastnatively. Dialect subclasses refining a family profile should copyDialect.getNullOrderingSupport()from the superclass and change only the values which differ.- Overrides:
getNullOrderingSupportin classDialect- Returns:
- the stable, non-null null-ordering-support profile
-
getCteSupport
Description copied from class:DialectThe common-table-expression capabilities of this Dialect.
The returned immutable profile must be non-null and stable for the lifetime of this Dialect. Hibernate may cache and reuse it. Overrides may construct a new profile or copy
CteSupport.STANDARD; invokingsuperis not required. This method is called only after Dialect construction, has no corresponding shutdown lifecycle, and failures propagate to the operation which obtains the profile.- Overrides:
getCteSupportin classDialect
-
getMutationSyntaxSupport
Description copied from class:DialectThe native SQL mutation-syntax capabilities of this Dialect.
The returned immutable profile must be non-null and stable for the lifetime of this Dialect. Report syntax which the translator may use directly; do not report a capability merely because it can be emulated.
QueryMutationRenderingSupportconsumes this profile when selecting a native or emulated plan.- Overrides:
getMutationSyntaxSupportin classDialect
-
getTupleCountSupport
Description copied from class:DialectSupplies the database syntax for ordinary and distinct tuple counts.
Return one non-null, immutable profile whose values remain stable for this Dialect's lifetime. Select
TupleCountSupport.Syntax.UNSUPPORTEDto use Hibernate's existing emulation,TupleCountSupport.Syntax.ARGUMENT_LISTfor syntax such ascount(a, b), orTupleCountSupport.Syntax.PARENTHESIZED_TUPLEfor syntax such ascount((a, b)). Configure the ordinary and distinct forms independently; a database may require different forms for them. When refining a family Dialect, copyDialect.getTupleCountSupport()from the superclass and replace only the differing syntax choice.- Overrides:
getTupleCountSupportin classDialect- Returns:
- the non-null tuple-count-syntax profile
-
causesRollback
Description copied from class:DialectDetermine whether this database marks the current transaction for rollback after the given statement failure.
Inspect the original database exception when the policy depends on its error code, SQL state, or subtype. This decision is independent of how Hibernate converts the exception. This determines both JDBC rollback state and whether a pessimistic lock failure becomes a JPA
PessimisticLockExceptionorLockTimeoutException.- Overrides:
causesRollbackin classDialect- Parameters:
sqlException- the original database exception- Returns:
truewhen the failed statement invalidates the transaction
-
buildSQLExceptionConversionDelegate
@SPI({IMPLEMENT,SUPPLY}) public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()Description copied from class:DialectSupplies vendor-specific SQL-exception conversion for this Dialect.
The returned delegate runs in addition to Hibernate's standard JDBC exception-hierarchy and SQL-state delegates. Its
nullresult means that it declined the exception so conversion may continue. Returnnullfrom this method when the Dialect has no vendor-specific delegate.Prefer stable vendor error codes or SQL states and preserve the original
SQLException.- Overrides:
buildSQLExceptionConversionDelegatein classDialect- Returns:
- the vendor conversion delegate, or
nullwhen none is supplied - See Also:
-