Top Description Inners Fields Constructors Methods
org.hibernate.dialect

public abstract Class Dialect

extends Object
implements ConversionContext, TypeContributor, FunctionContributor
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.FunctionContributor, org.hibernate.boot.model.TypeContributor, org.hibernate.exception.spi.ConversionContext
Known Direct Subclasses
org.hibernate.dialect.DialectDelegateWrapper, org.hibernate.dialect.H2Dialect, org.hibernate.dialect.HSQLDialect, org.hibernate.dialect.MySQLDialect, org.hibernate.dialect.OracleDialect, org.hibernate.dialect.SpannerDialect, org.hibernate.dialect.PostgreSQLDialect, org.hibernate.annotations.processing.GenericDialect, org.hibernate.dialect.AbstractHANADialect, org.hibernate.dialect.AbstractTransactSQLDialect, org.hibernate.dialect.CockroachDialect, org.hibernate.dialect.DB2Dialect, org.hibernate.dialect.DerbyDialect
Imports
java.io.InputStream, .OutputStream, java.sql.Blob, .CallableStatement, .Clob, .Connection, .DatabaseMetaData, .NClob, .PreparedStatement, .ResultSet, .ResultSetMetaData, .SQLException, .Timestamp, .Types, java.time.Duration, .Instant, .LocalDate, .LocalDateTime, .LocalTime, .OffsetDateTime, java.time.temporal.TemporalAccessor, java.util.Calendar, .Date, .HashSet, .List, .Locale, .Map, .Objects, .Properties, .Set, .TimeZone, .UUID, java.util.regex.Pattern, org.hibernate.Incubating, .Length, .LockMode, .LockOptions, .ScrollMode, org.hibernate.boot.TempTableDdlTransactionHandling, org.hibernate.boot.model.FunctionContributions, .FunctionContributor, .TypeContributions, .TypeContributor, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, .Sequence, org.hibernate.boot.spi.SessionFactoryOptions, org.hibernate.dialect.aggregate.AggregateSupport, .AggregateSupportImpl, org.hibernate.dialect.function.CastFunction, .CastStrEmulation, .CoalesceIfnullEmulation, .CommonFunctionFactory, .CurrentFunction, .ExtractFunction, .InsertSubstringOverlayEmulation, .LocatePositionEmulation, .LpadRpadPadEmulation, .SqlFunction, .TimestampaddFunction, .TimestampdiffFunction, .TrimFunction, org.hibernate.dialect.identity.IdentityColumnSupport, .IdentityColumnSupportImpl, org.hibernate.dialect.lock.LockingStrategy, .OptimisticForceIncrementLockingStrategy, .OptimisticLockingStrategy, .PessimisticForceIncrementLockingStrategy, .PessimisticReadSelectLockingStrategy, .PessimisticWriteSelectLockingStrategy, .SelectLockingStrategy, org.hibernate.dialect.pagination.LimitHandler, org.hibernate.dialect.sequence.NoSequenceSupport, .SequenceSupport, org.hibernate.dialect.temptable.StandardTemporaryTableExporter, .TemporaryTable, .TemporaryTableExporter, .TemporaryTableKind, org.hibernate.dialect.unique.AlterTableUniqueDelegate, .UniqueDelegate, org.hibernate.engine.jdbc.LobCreator, .Size, org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo, org.hibernate.engine.jdbc.env.internal.DefaultSchemaNameResolver, org.hibernate.engine.jdbc.env.spi.AnsiSqlKeywords, .IdentifierHelper, .IdentifierHelperBuilder, .JdbcEnvironment, .NameQualifierSupport, .SchemaNameResolver, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.spi.SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.exception.spi.ConversionContext, .SQLExceptionConversionDelegate, .SQLExceptionConverter, .ViolatedConstraintNameExtractor, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.MathHelper, .StringHelper, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.internal.util.io.StreamCopier, org.hibernate.loader.ast.spi.MultiKeyLoadSizingStrategy, org.hibernate.mapping.Column, .Constraint, .ForeignKey, .Index, .Table, .UserDefinedType, org.hibernate.metamodel.mapping.EntityMappingType, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.persister.entity.Lockable, org.hibernate.persister.entity.mutation.EntityMutationTarget, org.hibernate.procedure.internal.StandardCallableStatementSupport, org.hibernate.procedure.spi.CallableStatementSupport, org.hibernate.query.Query, org.hibernate.query.hql.HqlTranslator, org.hibernate.query.spi.QueryOptions, org.hibernate.query.sqm.CastType, .FetchClauseType, .IntervalType, .TemporalUnit, .TrimSpec, org.hibernate.query.sqm.mutation.internal.temptable.AfterUseAction, .BeforeUseAction, .PersistentTableInsertStrategy, .PersistentTableMutationStrategy, org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy, .SqmMultiTableMutationStrategy, .SqmMultiTableMutationStrategyProvider, org.hibernate.query.sqm.sql.SqmTranslatorFactory, org.hibernate.service.ServiceRegistry, org.hibernate.service.spi.ServiceRegistryImplementor, org.hibernate.sql.ForUpdateFragment, org.hibernate.sql.ast.SqlAstNodeRenderingMode, .SqlAstTranslatorFactory, org.hibernate.sql.ast.internal.ParameterMarkerStrategyStandard, org.hibernate.sql.ast.spi.ParameterMarkerStrategy, .SqlAppender, .StringBuilderSqlAppender, org.hibernate.sql.model.MutationOperation, org.hibernate.sql.model.internal.OptionalTableUpdate, org.hibernate.sql.model.jdbc.OptionalTableUpdateOperation, org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl, .SequenceInformationExtractorNoOpImpl, org.hibernate.tool.schema.extract.spi.ColumnTypeInformation, .SequenceInformationExtractor, org.hibernate.tool.schema.internal.HibernateSchemaManagementTool, .StandardAuxiliaryDatabaseObjectExporter, .StandardForeignKeyExporter, .StandardIndexExporter, .StandardSequenceExporter, .StandardTableCleaner, .StandardTableExporter, .StandardTableMigrator, .StandardUniqueKeyExporter, .StandardUserDefinedTypeExporter, .TableMigrator, org.hibernate.tool.schema.spi.Cleaner, .Exporter, .SchemaManagementTool, org.hibernate.type.BasicType, .BasicTypeRegistry, .SqlTypes, .StandardBasicTypes, org.hibernate.type.descriptor.WrapperOptions, org.hibernate.type.descriptor.java.JavaType, .PrimitiveByteArrayJavaType, org.hibernate.type.descriptor.jdbc.ArrayJdbcTypeConstructor, .BlobJdbcType, .ClobJdbcType, .JdbcLiteralFormatter, .JdbcType, .JdbcTypeConstructor, .LongNVarcharJdbcType, .NCharJdbcType, .NClobJdbcType, .NVarcharJdbcType, .TimeUtcAsJdbcTimeJdbcType, .TimeUtcAsOffsetTimeJdbcType, .TimestampUtcAsJdbcTimestampJdbcType, .TimestampUtcAsOffsetDateTimeJdbcType, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry, org.hibernate.type.descriptor.sql.internal.ArrayDdlTypeImpl, .CapacityDependentDdlType, .DdlTypeImpl, org.hibernate.type.descriptor.sql.spi.DdlTypeRegistry, org.hibernate.type.spi.TypeConfiguration, org.jboss.logging.Logger, jakarta.persistence.TemporalType

Represents a dialect of SQL implemented by a particular RDBMS. Every subclass of this class implements support for a certain database platform. For example, PostgreSQLDialect implements support for PostgreSQL, and MySQLDialect implements support for MySQL.

A subclass must provide a public constructor with a single parameter of type DialectResolutionInfo. Alternatively, for purposes of backward compatibility with older versions of Hibernate, a constructor with no parameters is also allowed.

Almost every subclass must, as a bare minimum, override at least:

A subclass representing a dialect of SQL which deviates significantly from ANSI SQL will certainly override many additional operations.

Subclasses should be thread-safe and immutable.

Since Hibernate 6, a single subclass of Dialect represents all releases of a given product-specific SQL dialect. The version of the database is exposed at runtime via the DialectResolutionInfo passed to the constructor, and by the getVersion() property.

Programs using Hibernate should migrate away from the use of versioned dialect classes like, for example, MySQL8Dialect. These classes are now deprecated and will be removed in a future release.

A custom Dialect may be specified using the configuration property hibernate.dialect, but for supported databases this property is unnecessary, and Hibernate will select the correct Dialect based on the JDBC URL and DialectResolutionInfo.

Author
Gavin King, David Channon

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Dialect.SizeStrategy

Pluggable strategy for determining the Size to use for columns of a given SQL type.

public class

Field Summary

Modifier and TypeField and Description
private final StandardAuxiliaryDatabaseObjectExporter
public static final String
CLOSED_QUOTE

Characters used as closing for quoting SQL identifiers

private static final Pattern
private static final Pattern
private static final ViolatedConstraintNameExtractor
private final StandardForeignKeyExporter
private final StandardIndexExporter
protected static final LobMergeStrategy
LEGACY_LOB_MERGE_STRATEGY

A LobMergeStrategy representing the legacy behavior of Hibernate.

private static final CoreMessageLogger
protected static final double
protected static final LobMergeStrategy
NEW_LOCATOR_LOB_MERGE_STRATEGY

A LobMergeStrategy based on creating a new LOB locator.

private final Properties
public static final String
QUOTE

Characters used as opening for quoting SQL identifiers

private final StandardSequenceExporter
private final Dialect.SizeStrategy
private final Set<String>
protected final MultiKeyLoadSizingStrategy
protected static final LobMergeStrategy
STREAM_XFER_LOB_MERGE_STRATEGY

A LobMergeStrategy based on transferring contents using streams.

private final StandardTableCleaner
private final StandardTableExporter
private final StandardTableMigrator
private final StandardTemporaryTableExporter
private final StandardUniqueKeyExporter
private final StandardUserDefinedTypeExporter
private final DatabaseVersion

Constructor Summary

AccessConstructor and Description
protected
Dialect()

Deprecated since 6.0. provide a DatabaseVersion
protected
protected

Method Summary

Modifier and TypeMethod and Description
public String
addSqlHintOrComment(String sql, QueryOptions queryOptions, boolean commentsEnabled)

Modify the SQL, adding hints or comments, if necessary

public void
appendArrayLiteral(SqlAppender appender, Object[] literal, JdbcLiteralFormatter<Object> elementFormatter, WrapperOptions wrapperOptions)

Append an array literal with the given elements to the given SqlAppender.

public void
appendBinaryLiteral(SqlAppender appender, byte[] bytes)

Append a binary literal to the given SqlAppender.

public void
appendBooleanValueString(SqlAppender
The SqlAppender to append the literal expression to
appender
,
boolean
The boolean value
bool
)

Append the SQL literal expression representing the given boolean value to the given SqlAppender.

public void
appendDatetimeFormat(SqlAppender appender, String format)

Translate the given datetime format string from the pattern language defined by Java's java.time.format.DateTimeFormatter to whatever pattern language is understood by the native datetime formatting function for this database (often the to_char() function).

public void
appendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone)

Append a datetime literal representing the given java.time value to the given SqlAppender.

public void
appendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone)

Append a datetime literal representing the given Date value to the given SqlAppender.

public void
appendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone)

Append a datetime literal representing the given Calendar value to the given SqlAppender.

public void
appendIntervalLiteral(SqlAppender appender, Duration literal)

Append a literal SQL interval representing the given Java Duration.

public void
appendLiteral(SqlAppender appender, String literal)

Append a literal string to the given SqlAppender.

public String

Returns:

The table with any required lock hints.
appendLockHint
(LockOptions
The lock options to apply
lockOptions
,
String
The name of the table to which to apply the lock hint.
tableName
)

Some dialects support an alternative means to SELECT FOR UPDATE, whereby a "lock hint" is appended to the table name in the from clause.

public void
appendUUIDLiteral(SqlAppender appender, UUID literal)

Append a literal SQL uuid representing the given Java UUID.

public String

Returns:

the modified SQL string.
applyLocksToSql
(String
the SQL string to modify
sql
,
LockOptions
lock options indexed by aliased table names.
aliasedLockOptions
,
Map<String, String[]>
a map of key columns indexed by aliased table names.
keyColumnNames
)

Modifies the given SQL, applying the appropriate updates for the specified lock modes and key columns.

public void
public void
public IdentifierHelper

Returns:

The IdentifierHelper instance to use, or null to indicate Hibernate should use its fallback path
buildIdentifierHelper
(IdentifierHelperBuilder
A partially-configured IdentifierHelperBuilder.
builder
,
DatabaseMetaData
Access to the metadata returned from the driver if needed and if available

Warning

it may be null.

dbMetaData
)

The IdentifierHelper indicated by this dialect for handling identifier conversions.

public SQLExceptionConversionDelegate

Returns:

The SQLExceptionConversionDelegate for this dialect
buildSQLExceptionConversionDelegate
()

An instance of SQLExceptionConversionDelegate for interpreting dialect-specific error or SQLState codes.

public boolean

Returns:

true if it does
canBatchTruncate
()

Does the truncate table statement accept multiple tables?

public boolean

Returns:

True if the dialect supports catalog creation; false otherwise.
canCreateCatalog
()

Does this dialect support creating and dropping catalogs?

public boolean

Returns:

True if the dialect supports schema creation; false otherwise.
canCreateSchema
()

Does this dialect support creating and dropping schema?

public boolean

Returns:

true if there is some way to do it
canDisableConstraints
()

Is there some way to disable foreign key constraint checking while truncating tables?

public String
castPattern(CastType
a CastType indicating the type of the value argument
from
,
CastType
a CastType indicating the type the value argument is cast to
to
)

Obtain a pattern for the SQL equivalent to a cast() function call.

protected String

Returns:

The SQL type to use in cast()
castType
(int
The JDBC type code representing the target type
sqlTypeCode
)

The SQL type to use in cast( ...

protected void
public char

Returns:

The dialect-specific close quote character.
closeQuote
()

The character specific to this dialect used to close a quoted identifier.

protected String

Returns:

a column type name, with $l, $p, $s placeholders for length, precision, scale
columnType
(int
a SQL type code
sqlTypeCode
)

The database column type name for a given JDBC type code defined in Types or SqlTypes.

public void
contribute(TypeContributions
The callback for adding contributed types
typeContributions
,
ServiceRegistry
The service registry
serviceRegistry
)

Implements org.hibernate.boot.model.TypeContributor.contribute.

Contribute types
public void
contributeFunctions(FunctionContributions
The target for the contributions
functionContributions
)

Implements org.hibernate.boot.model.FunctionContributor.contributeFunctions.

Contribute functions
public void
contributeTypes(TypeContributions
Callback to contribute the types
typeContributions
,
ServiceRegistry
The service registry
serviceRegistry
)

A callback which allows the Dialect to contribute types.

public MutationOperation
createOptionalTableUpdateOperation(EntityMutationTarget mutationTarget, OptionalTableUpdate optionalTableUpdate, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Create a MutationOperation for a updating an optional table
public String
currentDate()

Translation of the HQL/JPQL current_date function, which maps to the Java type java.sql.Date, and of the HQL local_date function which maps to the Java type java.time.LocalDate.

public String
currentLocalTime()

Translation of the HQL local_time function, which maps to the Java type java.time.LocalTime which is a time with no time zone.

public String
currentLocalTimestamp()

Translation of the HQL local_datetime function, which maps to the Java type java.time.LocalDateTime which is a datetime with no time zone.

public String
currentTime()

Translation of the HQL/JPQL current_time function, which maps to the Java type java.sql.Time which is a time with no time zone.

public String
currentTimestamp()

Translation of the HQL/JPQL current_timestamp function, which maps to the Java type java.sql.Timestamp which is a datetime with no time zone.

public String
currentTimestampWithTimeZone()

Translation of the HQL offset_datetime function, which maps to the Java type java.time.OffsetDateTime which is a datetime with a time zone.

public ScrollMode

Returns:

the default ScrollMode to use.
defaultScrollMode
()

A default ScrollMode to be used by Query#scroll().

public boolean

Returns:

True if writers block readers to achieve READ_COMMITTED; false otherwise.
doesReadCommittedCauseWritersToBlockReaders
()

For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?

public boolean

Returns:

True if readers block writers to achieve REPEATABLE_READ; false otherwise.
doesRepeatableReadCauseReadersToBlockWriters
()

For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?

public boolean

Returns:

True if constraints must be dropped prior to dropping the table; false otherwise.
dropConstraints
()

Do we need to drop constraints before dropping tables in this dialect?

public boolean

Returns:

true if the two type codes are equivalent
equivalentTypes
(int
the first column type info
typeCode1
,
int
the second column type info
typeCode2
)

Do the given JDBC type codes, as defined in Types represent essentially the same type in this dialect of SQL?

public static String
escapeComment(String comment)

Perform necessary character escaping on the text of the comment.

public String
extractPattern(TemporalUnit
the first argument
unit
)

Obtain a pattern for the SQL equivalent to an extract() function call.

public boolean

Returns:

boolean True if Lob values should be last, false if it does not matter.
forceLobAsLastValue
()

Must LOB values occur last in inserts and updates?

public String

Returns:

The generated as clause containing the given expression
generatedAs
(String
a SQL expression used to generate the column value
generatedAs
)

The generated as clause, or similar, for generated column declarations in DDL statements.

public String

Returns:

The add column fragment.
getAddColumnString
()

The subcommand of the alter table command used to add a column to a table, usually add column or add.

public String

Returns:

The suffix of the add column fragment.
getAddColumnSuffixString
()

The syntax for the suffix used to add a column to a table.

public String

Returns:

the "add FK" fragment
getAddForeignKeyConstraintString
(String
The foreign key constraint name
constraintName
,
String[]
The names of the columns comprising the foreign key
foreignKey
,
String
The table referenced by the foreign key
referencedTable
,
String[]
The explicit columns in the referencedTable referenced by this foreign key.
primaryKey
,
boolean
if false, constraint should be explicit about which column names the constraint refers to
referencesPrimaryKey
)

The syntax used to add a foreign key constraint to a table, with the referenced key columns explicitly specified.

public String
getAddForeignKeyConstraintString(String
The foreign key constraint name
constraintName
,
String
The whole definition of the foreign key as a fragment
foreignKeyDefinition
)

The syntax used to add a foreign key constraint to a table, given the definition of the foreign key as a string.

public String

Returns:

The "add PK" fragment
getAddPrimaryKeyConstraintString
(String
The name of the PK constraint.
constraintName
)

The syntax used to add a primary key constraint to a table.

public AggregateSupport
getAggregateSupport()

How does this dialect support aggregate types like SqlTypes#STRUCT.

public String

Returns:

a fragment to be appended to alter table
getAlterColumnTypeString
(String
the name of the column
columnName
,
String
the new type of the column
columnType
,
String
the full column definition
columnDefinition
)

The fragment of an alter table command which modifies a column type, or null if column types cannot be modified.

public String

Returns:

The command used to alter a table.
getAlterTableString
(String
The name of the table to alter
tableName
)

The command used to alter a table with the given name, usually alter table tab_name or alter table tab_name if exists.

public String
getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength)

The SQL type name for the array type with elements of the given type name.

public Exporter<AuxiliaryDatabaseObject>
public MultiKeyLoadSizingStrategy
getBatchLoadSizingStrategy()

The strategy used to determine the appropriate number of keys to load in a single SQL query with batch-fetch loading.

public CallableStatementSupport
public String

Returns:

The cascade drop keyword, if any, with a leading space
getCascadeConstraintsString
()

The keyword that specifies that a drop table operation should be cascaded to its constraints, typically " cascade" where the leading space is required, or the empty string if there is no such keyword in this dialect.

public String

Returns:

The dialect-specific case-insensitive like operator.
getCaseInsensitiveLike
()

The name of the SQL operator that performs case-insensitive LIKE comparisons.

public String

Returns:

a SQL expression that will occur in a check constraint
getCheckCondition
(String columnName, String[] values)

Render a SQL check condition for a column that represents an enumerated value by its string representation.

public String
getCheckCondition(String columnName, Class<? extends Enum<?>> enumType)

public String

Returns:

a SQL expression that will occur in a check constraint
getCheckCondition
(String columnName, long min, long max)

Render a SQL check condition for a column that represents an enumerated value.

public String

Returns:

a SQL expression that will occur in a check constraint
getCheckCondition
(String columnName, long[] values)

Render a SQL check condition for a column that represents an enumerated value by its ordinal representation.

public ColumnAliasExtractor
public String

Returns:

The comment fragment
getColumnComment
(String
The comment to apply
comment
)

Get the comment into a form supported for column definition.

public String[]

Returns:

The creation commands
getCreateCatalogCommand
(String
The name of the catalog to be created.
catalogName
)

Get the SQL command used to create the named catalog.

public String[]
public String[]
getCreateEnumTypeCommand(Class<? extends Enum<?>> enumType)

public String

Returns:

The command used to create an index.
getCreateIndexString
(boolean
true if the index is a unique index
unique
)

The command used to create an index, usually create index or create unique index.

public String
getCreateIndexTail(boolean unique, List<Column> columns)

A string to be appended to the end of the create index command, usually to specify that null values are to be considered distinct.

public String

Returns:

The command used to create a multiset table.
getCreateMultisetTableString
()

Slight variation on getCreateTableString.

public String[]

Returns:

The creation commands
getCreateSchemaCommand
(String
The name of the schema to be created.
schemaName
)

Get the SQL command used to create the named schema.

public String

Returns:

The command used to create a table.
getCreateTableString
()

The command used to create a table, usually create table.

public String

Returns:

The annotation to be appended, for example, COLLATE DATABASE_DEFAULT in SQL Server
getCreateTemporaryTableColumnAnnotation
(int
The SQL type code
sqlTypeCode
)

Annotation to be appended to the end of each COLUMN clause for temporary tables.

public String
getCreateUserDefinedTypeExtensionsString()

An arbitrary extension to append to the end of the UDT create type command.

public String
getCreateUserDefinedTypeKindString()

The kind of user-defined type to create, or the empty string if this does not need to be specified.

public String

Returns:

The current schema retrieval SQL
getCurrentSchemaCommand
()

Get the SQL command used to retrieve the current schema name.

public String
getCurrentTimestampSelectString()

The command used to retrieve the current timestamp from the database.

public int

Returns:

the default precision, in decimal digits
getDefaultDecimalPrecision
()

This is the default precision for a generated column mapped to a java.math.BigInteger or java.math.BigDecimal.

public int

Returns:

the default scale, in decimal digits, of the fractional seconds field
getDefaultIntervalSecondScale
()

Resolves the default scale for a SqlTypes.INTERVAL_SECOND type code for the given column

Usually 9 (nanosecond) or 6 (microseconds).

public long

Returns:

1048576 by default
getDefaultLobLength
()

The default length for a LOB column, if LOB columns have a length in this dialect.

public boolean
getDefaultNonContextualLobCreation()

The default value to use for the configuration property hibernate.jdbc.lob.non_contextual_creation.

public Properties

Returns:

a set of Hibernate configuration properties
getDefaultProperties
()

Retrieve a set of default Hibernate properties for this database.

public int
getDefaultStatementBatchSize()

The default value to use for the configuration property hibernate.jdbc.batch_size.

public int

Returns:

the default precision, in decimal digits, of the fractional seconds field
getDefaultTimestampPrecision
()

This is the default precision for a generated column mapped to a Timestamp or java.time.LocalDateTime.

public boolean
getDefaultUseGetGeneratedKeys()

The default value to use for the configuration property hibernate.jdbc.use_get_generated_keys.

public String
getDisableConstraintsStatement()

A SQL statement that temporarily disables foreign key constraint checking for all tables.

public String
getDisableConstraintStatement(String
the name of the table
tableName
,
String
the name of the constraint
name
)

A SQL statement that temporarily disables checking of the given foreign key constraint.

public DmlTargetColumnQualifierSupport

Returns:

the column qualifier support required by this dialect
getDmlTargetColumnQualifierSupport
()

Get the minimum DmlTargetColumnQualifierSupport required by this dialect.

public int

Returns:

a value representing "double precision", usually in binary digits, but sometimes in decimal digits
getDoublePrecision
()

This is the default precision for a generated column mapped to a Java Double or double.

public String[]

Returns:

The drop commands
getDropCatalogCommand
(String
The name of the catalog to be dropped.
catalogName
)

Get the SQL command used to drop the named catalog.

public String[]
public String[]
getDropEnumTypeCommand(Class<? extends Enum<?>> enumType)

public String
getDropForeignKeyString()

The subcommand of the alter table command used to drop a foreign key constraint, usually drop constraint.

public String[]

Returns:

The drop commands
getDropSchemaCommand
(String
The name of the schema to be dropped.
schemaName
)

Get the SQL command used to drop the named schema.

public String

Returns:

The drop table statement as a string
getDropTableString
(String
The name of the table to drop
tableName
)

The command used to drop a table with the given name, usually drop table tab_name.

public String
getDropUniqueKeyString()

The subcommand of the alter table command used to drop a unique key constraint.

public String
getEnableConstraintsStatement()

A SQL statement that re-enables foreign key constraint checking for all tables.

public String
getEnableConstraintStatement(String
the name of the table
tableName
,
String
the name of the constraint
name
)

A SQL statement that re-enables checking of the given foreign key constraint.

public String

Returns:

the DDL column type declaration
getEnumTypeDeclaration
(String name, String[]
the enumerated values of the type
values
)

If this database has a special MySQL-style enum column type, return the type declaration for the given enumeration of values.

public String
getEnumTypeDeclaration(Class<? extends Enum<?>> enumType)

public SchemaManagementTool

Returns:

a HibernateSchemaManagementTool by default
getFallbackSchemaManagementTool
(Map<String, Object> configurationValues, ServiceRegistryImplementor registry)

The SchemaManagementTool to use if none is explicitly specified.

public SqmMultiTableInsertStrategy
public SqmMultiTableMutationStrategy
public int

Returns:

a value representing "single precision", usually in binary digits, but sometimes in decimal digits
getFloatPrecision
()

This is the default precision for a generated column mapped to a Java Float or float.

public Exporter<ForeignKey>
public String

Returns:

The appropriate FOR UPDATE NOWAIT clause string.
getForUpdateNowaitString
()

Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.

public String

Returns:

The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.
getForUpdateNowaitString
(String
The columns to be write locked.
aliases
)

Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect, given the aliases of the columns to be write locked.

public String

Returns:

The appropriate FOR UPDATE SKIP LOCKED clause string.
getForUpdateSkipLockedString
()

Retrieves the FOR UPDATE SKIP LOCKED syntax specific to this dialect.

public String

Returns:

The appropriate FOR UPDATE colunm_list SKIP LOCKED clause string.
getForUpdateSkipLockedString
(String
The columns to be write locked.
aliases
)

Get the FOR UPDATE OF column_list SKIP LOCKED fragment appropriate for this dialect, given the aliases of the columns to be write locked.

public String

Returns:

The appropriate for update fragment.
getForUpdateString
(LockOptions
contains the lock mode to apply.
lockOptions
)

Given a set of LockOptions (lock level, timeout), determine the appropriate for update fragment to use to obtain the lock.

private String

Returns:

The appropriate for update fragment.
getForUpdateString
(LockMode
the lock mode to apply.
lockMode
,
int
the timeout
timeout
)

Given a lock level and timeout, determine the appropriate for update fragment to use to obtain the lock.

public String

Returns:

The appropriate for update fragment.
getForUpdateString
(LockMode
The lock mode to apply.
lockMode
)

Given a LockMode, determine the appropriate for update fragment to use to obtain the lock.

public String

Returns:

The appropriate FOR UPDATE clause string.
getForUpdateString
()

Get the string to append to SELECT statements to acquire pessimistic UPGRADE locks for this dialect.

public String

Returns:

The appropriate FOR UPDATE OF column_list clause string.
getForUpdateString
(String
The columns to be write locked.
aliases
)

Get the FOR UPDATE OF column_list fragment appropriate for this dialect, given the aliases of the columns to be write locked.

public String

Returns:

The appropriate FOR UPDATE OF column_list clause string.
getForUpdateString
(String
The columns to be locked.
aliases
,
LockOptions
the lock options to apply
lockOptions
)

Get the FOR UPDATE OF or FOR SHARE OF fragment appropriate for this dialect, given the aliases of the columns to be locked.

public long

Returns:

the precision, specified as a quantity of nanoseconds
getFractionalSecondPrecisionInNanos
()

The "native" precision for arithmetic with datetimes and day-to-second durations.

public FunctionalDependencyAnalysisSupport
getFunctionalDependencyAnalysisSupport()

Get this dialect's level of support for primary key functional dependency analysis within GROUP BY and ORDER BY clauses.

public SelectItemReferenceStrategy
getGroupBySelectItemReferenceStrategy()

Determine how selected items are referenced in the group by clause.

public HqlTranslator
getHqlTranslator()

Return an HqlTranslator specific to this dialect, or null to use the standard translator.

public IdentityColumnSupport

Returns:

the IdentityColumnSupport
getIdentityColumnSupport
()

Get the appropriate IdentityColumnSupport for this dialect.

public Exporter<Index>
public int

Returns:

The limit, or a non-positive integer to indicate no limit.
getInExpressionCountLimit
()

Return the limit that the underlying database places on the number of elements in an IN predicate.

public Set<String>
getKeywords()

The keywords of this SQL dialect.

public LimitHandler
getLimitHandler()

Obtain a LimitHandler that implements pagination support for Query#setMaxResults(int) and Query#setFirstResult(int).

public LobMergeStrategy
public LockingStrategy

Returns:

The appropriate locking strategy.
getLockingStrategy
(Lockable
The persister for the entity to be locked.
lockable
,
LockMode
The type of lock to be acquired.
lockMode
)

Deprecated as a consequence of Lockable being deprecated.
A LockingStrategy which is able to acquire a database-level lock with the specified level.
public RowLockStrategy
getLockRowIdentifier(LockMode lockMode)

Obtain a RowLockStrategy for the given LockMode.

public String

Returns:

The dialect-specific lowercase function.
getLowercaseFunction
()

The name of the SQL function that transforms a string to lowercase, almost always lower.

public int

Returns:

The maximum length.
getMaxAliasLength
()

What is the maximum length Hibernate can use for generated aliases?

public int

Returns:

The maximum length.
getMaxIdentifierLength
()

What is the maximum identifier length supported by this dialect?

public int
getMaxNVarcharCapacity()

The longest possible length of a java.sql.Types#NVARCHAR-like column.

public int
getMaxNVarcharLength()

The biggest size value that can be supplied as argument to a java.sql.Types#NVARCHAR-like type.

public int
getMaxVarbinaryCapacity()

The longest possible length of a java.sql.Types#VARBINARY-like column.

public int
getMaxVarbinaryLength()

The biggest size value that can be supplied as argument to a java.sql.Types#VARBINARY-like type.

public int
getMaxVarcharCapacity()

The longest possible length of a java.sql.Types#VARCHAR-like column.

public int
getMaxVarcharLength()

The biggest size value that can be supplied as argument to a java.sql.Types#VARCHAR-like type.

protected DatabaseVersion
getMinimumSupportedVersion()

Get the version of the SQL dialect that is the minimum supported by this implementation.

public MultiKeyLoadSizingStrategy
getMultiKeyLoadSizingStrategy()

The strategy used to determine the appropriate number of keys to load in a single SQL query with multi-key loading.

public NameQualifierSupport
public NationalizationSupport
getNationalizationSupport()

Determines whether this database requires the use of explicitly nationalized character (Unicode) data types.

public String

Returns:

The name identifying the native generator strategy.
getNativeIdentifierGeneratorStrategy
()

The name identifying the "native" id generation strategy for this dialect.

public ParameterMarkerStrategy

Returns:

May return null to indicate that the JDBC standard strategy should be used
getNativeParameterMarkerStrategy
()

Support for native parameter markers.

public String

Returns:

The appropriate empty values clause.
getNoColumnsInsertString
()

Deprecated since 6. Override the method renderInsertIntoNoColumns() on the translator returned by this dialect.
The fragment used to insert a row without specifying any column values, usually just (), but sometimes default values.
public String
getNullColumnString()

The keyword used to specify a nullable column, usually "", but sometimes " null".

public String
getNullColumnString(String columnType)

The keyword used to specify a nullable column of the given SQL type.

public NullOrdering
getNullOrdering()

Returns the default ordering of null.

public int

Returns:

The limit, or a non-positive integer to indicate no limit.
getParameterCountLimit
()

Return the limit that the underlying database places on the number of parameters that can be defined for a PreparedStatement.

public int

Returns:

one of the type codes defined by SqlTypes.
getPreferredSqlTypeCodeForArray
()

The JDBC type code to use for mapping properties of basic Java array or Collection types.

public int

Returns:

one of the type codes defined by Types.
getPreferredSqlTypeCodeForBoolean
()

The JDBC type code to use for mapping properties of Java type boolean.

public String

Returns:

The modified SQL
getQueryHintString
(String
The query to which to apply the hint.
query
,
List<String>
The hints to apply
hintList
)

Apply a hint to the given SQL query.

public String

Returns:

The modified SQL
getQueryHintString
(String
The query to which to apply the hint.
query
,
String
The hints to apply
hints
)

Apply a hint to the given SQL query.

public String

Returns:

The select command; or null if sequences are not supported.
getQuerySequencesString
()

Get the select command used retrieve the names of all sequences.

public String

Returns:

The appropriate LOCK clause string.
getReadLockString
(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Get the string to append to SELECT statements to acquire READ locks for this dialect.

public String

Returns:

The appropriate LOCK clause string.
getReadLockString
(String
The columns to be read locked.
aliases
,
int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Get the string to append to SELECT statements to acquire READ locks for this dialect, given the aliases of the columns to be read locked.

public RowLockStrategy
getReadRowLockStrategy()

The row lock strategy to use for read locks.

public ResultSet

Returns:

The extracted result set.
getResultSet
(CallableStatement
The callable statement.
statement
)

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the OUT parameter.

public ResultSet

Returns:

The extracted result set.
getResultSet
(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
position
)

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the positional OUT parameter.

public ResultSet

Returns:

The extracted result set.
getResultSet
(CallableStatement
The callable statement.
statement
,
String
The parameter name (for drivers which support named parameters).
name
)

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the named OUT parameter.

public String

Returns:

the DDL column definition, or null if the rowid is an implicit pseudo-column
getRowIdColumnString
(String rowId)

If this dialect requires that the rowid column be declared explicitly, return the DDL column definition.

public SchemaNameResolver

Returns:

The schema name resolver strategy
getSchemaNameResolver
()

Get the strategy for determining the schema name from a JDBC Connection, usually DefaultSchemaNameResolver.

public String

Returns:

The appropriate select clause value fragment.
getSelectClauseNullString
(int
The Types type code.
sqlType
,
TypeConfiguration
The type configuration
typeConfiguration
)

Given a JDBC type code, return the expression for a literal null value of that type, to use in a select clause.

public String

Returns:

The appropriate command.
getSelectGUIDString
()

Get the command used to select a GUID from the database.

public Exporter<Sequence>
public SequenceInformationExtractor
public SequenceSupport
getSequenceSupport()

Get the appropriate SequenceSupport for this dialect.

public Dialect.SizeStrategy
getSizeStrategy()

A custom SizeStrategy for column types.

public SqlAstTranslatorFactory
getSqlAstTranslatorFactory()

Return a SqlAstTranslatorFactory specific to this dialect, or null to use the standard translator.

public SqmTranslatorFactory
getSqmTranslatorFactory()

Return a SqmTranslatorFactory specific to this dialect, or null to use the standard translator.

public TemporaryTableKind
getSupportedTemporaryTableKind()

The kind of temporary tables that are supported on this database.

public Cleaner
public String

Returns:

The comment fragment
getTableComment
(String
The comment to apply
comment
)

Get the comment into a form supported for table definition.

public Exporter<Table>
public TableMigrator
public String
getTableTypeString()

An arbitrary fragment appended to the end of the create table statement.

public AfterUseAction
getTemporaryTableAfterUseAction()

The action to take after finishing use of a temporary table.

public BeforeUseAction
getTemporaryTableBeforeUseAction()

The action to take before beginning use of a temporary table.

public String
getTemporaryTableCreateCommand()

The command to create a temporary table.

public String
getTemporaryTableCreateOptions()

An arbitrary SQL fragment appended to the end of the statement to create a temporary table, specifying dialect-specific options, or null if there are no options to specify.

public TempTableDdlTransactionHandling
getTemporaryTableDdlTransactionHandling()

The sort of transaction handling to use when creating or dropping temporary tables.

public String
getTemporaryTableDropCommand()

The command to drop a temporary table.

public TemporaryTableExporter
public String
getTemporaryTableTruncateCommand()

The command to truncate a temporary table.

protected int
getTimeoutInSeconds(int millis)

public TimeZoneSupport
getTimeZoneSupport()

How the dialect supports time zone types like Types#TIMESTAMP_WITH_TIMEZONE.

public String
getTruncateTableStatement(String
the name of the table
tableName
)

A SQL statement that truncates the given table.

public String[]
getTruncateTableStatements(String[]
the names of the tables
tableNames
)

A SQL statement or statements that truncate the given tables.

public UniqueDelegate

Returns:

The UniqueDelegate
getUniqueDelegate
()

Get the UniqueDelegate supported by this dialect

public Exporter<Constraint>
public String

Returns:

The comment fragment
getUserDefinedTypeComment
(String
The comment to apply
comment
)

Get the comment into a form supported for UDT definition.

public Exporter<UserDefinedType>
public DatabaseVersion
getVersion()

Get the version of the SQL dialect that is the target of this instance.

public ViolatedConstraintNameExtractor
public String

Returns:

The appropriate LOCK clause string.
getWriteLockString
(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Get the string to append to SELECT statements to acquire pessimistic WRITE locks for this dialect.

public String

Returns:

The appropriate LOCK clause string.
getWriteLockString
(String
The columns to be read locked.
aliases
,
int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Get the string to append to SELECT statements to acquire WRITE locks for this dialect, given the aliases of the columns to be write locked.

public RowLockStrategy
getWriteRowLockStrategy()

The row lock strategy to use for write locks.

public boolean

Returns:

True if we support altering existing tables; false otherwise.
hasAlterTable
()

Does this dialect support the ALTER TABLE syntax?

public boolean

Returns:

true if an explicit type is required
hasDataTypeBeforeGeneratedAs
()

Is an explicit column type required for generated as columns?

public boolean

Returns:

true if the database/driver has this bug
hasSelfReferentialForeignKeyBug
()

Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?

protected void
initDefaultProperties()

Set appropriate default values for configuration properties.

public void
initializeFunctionRegistry(FunctionContributions functionContributions)

Initialize the given registry with any dialect-specific functions.

public String
inlineLiteral(String literal)

Deprecated for removal since 6. This is no longer called
public boolean
isAnsiNullOn()

Deprecated since 6. This is only called from SybaseASESqlAstTranslator so it doesn't need to be declared here.
A setting specific to SybaseASEDialect.
public boolean

Returns:

if the getCurrentTimestampSelectString is treated as callable; false otherwise.
isCurrentTimestampSelectStringCallable
()

Is the command returned by getCurrentTimestampSelectString treated as callable?

public boolean

Returns:

boolean True if an empty string is treated as null, false otherwise.
isEmptyStringTreatedAsNull
()

Return whether the dialect considers an empty string value to be null.

public boolean
isJdbcLogWarningsEnabledByDefault()

Is JDBC statement warning logging enabled by default?

protected boolean
isLob(int sqlTypeCode)

public boolean

Returns:

True if the lock timeout is rendered into the SQL string as a parameter; false otherwise.
isLockTimeoutParameterized
()

Deprecated for removal since 6. This is never called, and since at least Hibernate 5 has just returned false in every dialect. It will be removed.
If this dialect supports specifying lock timeouts, are those timeouts rendered into the SQL string as parameters?
public char

Returns:

The dialect-specific open quote character.
openQuote
()

The character specific to this dialect used to begin a quoted identifier.

public int
ordinal()

Overrides default org.hibernate.boot.model.FunctionContributor.ordinal.

Determines order in which the contributions will be applied (lowest ordinal first).
protected String
prependComment(String sql, String comment)

Prepend a comment to the given SQL fragment.

public boolean

Returns:

true if we do
qualifyIndexName
()

Do we need to qualify index names with the schema name?

public String

Returns:

The quoted (or unmodified, if not starting with backtick) value.
quote
(String
The value to be quoted.
name
)

Apply dialect-specific quoting if the given name is quoted using backticks.

public String
quoteCollation(String collation)

Quote the given collation name if necessary.

protected void
registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)

Register ANSI-standard column types using the length limits defined by getMaxVarcharLength(), getMaxNVarcharLength(), and getMaxVarbinaryLength().

protected void
registerDefaultKeywords()

Register the reserved words of ANSI-standard SQL as keywords.

protected void
registerKeyword(String
a reserved word in this SQL dialect
word
)

Register a keyword.

protected void
registerKeywords(DialectResolutionInfo info)

Register the reserved words reported by the JDBC driver as keywords.

public int

Returns:

The number of (contiguous) bind positions used.
registerResultSetOutParameter
(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
position
)

Registers a parameter capable of returning a ResultSet by position, either an OUT parameter, or a REF_CURSOR parameter as defined in Java 8.

public int

Returns:

The number of (contiguous) bind positions used.
registerResultSetOutParameter
(CallableStatement
The callable statement.
statement
,
String
The parameter name (for drivers which support named parameters).
name
)

Registers a parameter capable of returning a ResultSet by name, either an OUT parameter, or a REF_CURSOR parameter as defined in Java 8.

public boolean

Returns:

true if casting using cast() is required
requiresCastForConcatenatingNonStrings
()

Does this dialect/database require casting of non-string arguments in the concat() function?

public boolean

Returns:

True if integer divisions must be cast()ed to float
requiresFloatCastingOfIntegerDivision
()

Does this dialect require that integer divisions be wrapped in cast() calls to tell the db parser the expected type.

public boolean

Returns:

boolean
requiresParensForTupleCounts
()

If supportsTupleCounts() is true, does this dialect require the tuple to be delimited with parentheses?

public boolean

Returns:

boolean
requiresParensForTupleDistinctCounts
()

If supportsTupleDistinctCounts() is true, does this dialect require the tuple to be delimited with parentheses?

protected Integer
resolveSqlTypeCode(String columnTypeName, TypeConfiguration typeConfiguration)

Resolves the SqlTypes type code for the given column type name as reported by the database, or null if it can't be resolved.

protected Integer
resolveSqlTypeCode(String typeName, String baseTypeName, TypeConfiguration typeConfiguration)

Resolves the SqlTypes type code for the given column type name as reported by the database and the base type name (i.e. without precision, length and scale), or null if it can't be resolved.

public JdbcType

Returns:

an appropriate instance of JdbcType
resolveSqlTypeDescriptor
(String
the column type name
columnTypeName
,
int jdbcTypeCode, int
the precision or 0
precision
,
int
the scale or 0
scale
,
JdbcTypeRegistry jdbcTypeRegistry)

Assigns an appropriate JdbcType to a column of a JDBC result set based on the column type name, JDBC type code, precision, and scale.

public int

Returns:

the precision or length of the column
resolveSqlTypeLength
(String
the name of the column type
columnTypeName
,
int
the JDBC type code of the column type
jdbcTypeCode
,
int
the (numeric) precision or (character) length of the column
precision
,
int
the scale of a numeric column
scale
,
int
the display size of the column
displaySize
)

Determine the length/precision of a column based on information in the JDBC java.sql.ResultSetMetaData.

public String
rowId(String
the name specified by org.hibernate.annotations.RowId#value(), which is ignored if getRowIdColumnString is not overridden
rowId
)

The name of a rowid-like pseudo-column which acts as a high-performance row locator, or null if this dialect has no such pseudo-column.

public int

Returns:

Types#ROWID by default
rowIdSqlType
()

The JDBC type code of the rowid-like pseudo-column which acts as a high-performance row locator.

private boolean
sameColumnType(int typeCode1, int typeCode2)

private DdlTypeImpl
simpleSqlType(int sqlTypeCode)

private CapacityDependentDdlType.Builder

Returns:

the builder object
sqlTypeBuilder
(int
the JDBC type code abstracting over the capacity-limited types
sqlTypeCode
,
int
the real JDBC type code of the largest type
biggestSqlTypeCode
,
int
the real JDBC type code to use to look at the type to use in typecasts
castTypeCode
)

Obtain a builder object for a family of capacity-dependent SQL types.

public boolean
supportsAlterColumnType()

Does this dialect support modifying the type of an existing column?

public Boolean

Returns:

true indicates it does; false indicates it does not; null indicates it might and that database-metadata should be consulted.
supportsBatchUpdates
()

Whether this Dialect supports batch updates.

public boolean

Returns:

Returns true if the database supports accepting bind params as args, false otherwise. The default is true.
supportsBindAsCallableArgument
()

Does this dialect support using a JDBC bind parameter as an argument to a function or procedure call?

public boolean

Returns:

true if there is a BIT or BOOLEAN type
supportsBitType
()

Does this dialect have a true SQL BIT type with just two values (0 and 1) or, even better, a proper SQL BOOLEAN type, or does Types#BIT get mapped to a numeric type with more than two values?

public boolean

Returns:

true if the dialect does support the on delete clause.
supportsCascadeDelete
()

Does this dialect support on delete actions in foreign key definitions?

public boolean

Returns:

true if the database supports case-insensitive like comparisons, false otherwise. The default is false.
supportsCaseInsensitiveLike
()

Does this dialect support case-insensitive LIKE comparisons?

public boolean

Returns:

True if circular cascade delete constraints are supported; false otherwise.
supportsCircularCascadeDeleteConstraints
()

Does this dialect support definition of cascade delete constraints which can cause circular chains?

public boolean

Returns:

True if column-level check constraints are supported; false otherwise.
supportsColumnCheck
()

Does this dialect support column-level check constraints?

public boolean

Returns:

true if commenting is supported
supportsCommentOn
()

Does this dialect support commenting on tables and columns?

public boolean

Returns:

True if the current timestamp can be retrieved; false otherwise.
supportsCurrentTimestampSelection
()

Does this dialect support some way to retrieve the current timestamp value from the database?

public boolean

Returns:

True if this SQL dialect is known to support some kind of distinct from predicate; false otherwise
supportsDistinctFromPredicate
()

Does this dialect support some kind of distinct from predicate?

public boolean

Returns:

True if exists checks are allowed in the select clause; false otherwise.
supportsExistsInSelect
()

Does the dialect support an exists statement in the select clause?

public boolean

Returns:

True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
supportsExpectedLobUsagePattern
()

"Expected" LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes.

public boolean

Returns:

true if the underlying database supports the given fetch clause type, false otherwise. The default is false.
supportsFetchClause
(FetchClauseType
The fetch clause type
type
)

Does this dialect support the given FETCH clause type.

public boolean
supportsFractionalTimestampArithmetic()

Whether the database supports adding a fractional interval to a timestamp, for example timestamp + 0.5 second.

public boolean

Returns:

true if if exists can be applied after alter table
supportsIfExistsAfterAlterTable
()

For an alter table, can the phrase if exists be applied?

public boolean

Returns:

true if if exists can be applied after the constraint name
supportsIfExistsAfterConstraintName
()

For dropping a constraint with an alter table, can the phrase if exists be applied after the constraint name?

public boolean

Returns:

true if if exists can be applied after the table name
supportsIfExistsAfterTableName
()

For dropping a table, can the phrase if exists be applied after the table name?

public boolean

Returns:

true if if exists can be applied after the type name
supportsIfExistsAfterTypeName
()

For dropping a type, can the phrase if exists be applied after the type name?

public boolean

Returns:

true if if exists can be applied before the constraint name
supportsIfExistsBeforeConstraintName
()

For dropping a constraint with an alter table statement, can the phrase if exists be applied before the constraint name?

public boolean

Returns:

true if if exists can be applied before the table name
supportsIfExistsBeforeTableName
()

For dropping a table, can the phrase if exists be applied before the table name?

public boolean

Returns:

true if if exists can be applied before the type name
supportsIfExistsBeforeTypeName
()

For dropping a type, can the phrase if exists be applied before the type name?

public boolean

Returns:

true if org.hibernate.id.insert.InsertReturningDelegate works for any sort of primary key column (not just identity columns), or false if InsertReturningDelegate does not work, or only works for specialized identity/"autoincrement" columns
supportsInsertReturning
()

Does this dialect fully support returning arbitrary generated column values after execution of an insert statement, using native SQL syntax?

public boolean

Returns:

true if org.hibernate.id.insert.GetGeneratedKeysDelegate works for any sort of primary key column (not just identity columns), or false if GetGeneratedKeysDelegate does not work, or only works for specialized identity/"autoincrement" columns
supportsInsertReturningGeneratedKeys
()

Does this dialect fully support returning arbitrary generated column values after execution of an insert statement, using the JDBC method Connection#prepareStatement(String, String[]).

public boolean

Returns:

true if the database supports is true and is false, or false if it does not. The default is is false.
supportsIsTrue
()

Does this dialect support the is true and is false operators?

public boolean

Returns:

true if LOBs can be created via the JDBC Connection.
supportsJdbcConnectionLobCreation
(DatabaseMetaData
JDBC DatabaseMetaData which can be used if LOB creation is supported only starting from a given driver version
databaseMetaData
)

Check whether the JDBC Connection supports creating LOBs via Connection#createBlob(), Connection#createNClob(), or Connection#createClob().

public boolean

Returns:

true if the underlying database supports lateral, false otherwise. The default is false.
supportsLateral
()

Does this dialect support the SQL lateral keyword or a proprietary alternative?

public boolean

Returns:

True if the changes are propagated back to the database; false otherwise.
supportsLobValueChangePropagation
()

Does the dialect support propagating changes to LOB values back to the database?

public boolean

Returns:

True is this dialect supports specifying lock timeouts.
supportsLockTimeouts
()

Does this dialect support specifying timeouts when requesting locks.

public boolean

Returns:

true if LOBs can be set with the materialized APIs.
supportsMaterializedLobAccess
()

Check whether the JDBC driver allows setting LOBs via PreparedStatement#setBytes(int, byte[]), PreparedStatement#setNString(int, String), or PreparedStatement#setString(int, String) APIs.

public boolean
public boolean

Returns:

if this dialect supports no-column INSERT.
supportsNoColumnsInsert
()

Is the INSERT statement is allowed to contain no columns?

public boolean

Returns:

true if non-query statements are supported with CTE
supportsNonQueryWithCTE
()

Does this dialect support insert, update, and delete statements with Common Table Expressions (CTEs)?

public boolean

Returns:

true if NO_WAIT is supported
supportsNoWait
()

Does this dialect support NO_WAIT timeout.

public boolean
supportsNullPrecedence()

Does this dialect support nulls first and nulls last?

public boolean

Returns:

true if it does
supportsOffsetInSubquery
()

Does this dialect support offset in subqueries?

public boolean

Returns:

true if it does
supportsOrderByInSubquery
()

Does this dialect support the order by clause in subqueries?

public boolean

Returns:

true if result variable references by column positions are supported; false otherwise.
supportsOrdinalSelectItemReference
()

Does this dialect support references to result variables (i.e, select items) by column positions (1-origin) as defined by the select clause?

public boolean

Returns:

True if outer-joined rows can be locked via FOR UPDATE.
supportsOuterJoinForUpdate
()

Does this dialect support FOR UPDATE in conjunction with outer-joined rows?

public boolean

Returns:

True if this is supported; false otherwise.
supportsParametersInInsertSelect
()

Deprecated for removal since 6. This seems to be supported on all platforms, and we don't call this except in test suite
Does this dialect support parameters within the SELECT clause of INSERT ...
public boolean
supportsPartitionBy()

Does is dialect support partition by?

protected boolean
supportsPredicateAsExpression()

Whether a predicate like a > 0 can appear in an expression context, for example, in a select list item.

public boolean

Returns:

true if recursive CTEs are supported
supportsRecursiveCTE
()

Does this dialect/database support recursive CTEs?

public Boolean

Returns:

true indicates it does; false indicates it does not; null indicates it might and that database-metadata should be consulted
supportsRefCursors
()

Whether this Dialect supports the JDBC java.sql.Types#REF_CURSOR type.

public boolean

Returns:

True if methods like ResultSet#isAfterLast and ResultSet#isBeforeFirst are supported for forward only cursors; false otherwise.
supportsResultSetPositionQueryMethodsOnForwardOnlyCursor
()

Does this dialect support asking the result set its positioning information on forward-only cursors?

public boolean

Returns:

true if SKIP_LOCKED is supported
supportsSkipLocked
()

Does this dialect support SKIP_LOCKED timeout.

public boolean

Returns:

boolean
supportsStandardArrays
()

Does this database have native support for ANSI SQL standard arrays which are expressed in terms of the element type name: integer array.

public boolean
supportsStandardCurrentTimestampFunction()

Does this dialect have an ANSI SQL current_timestamp function?

public boolean

Returns:

true if it does
supportsSubqueryInSelect
()

Does this dialect support subqueries in the select clause?

public boolean

Returns:

True if this dialect allows references the mutating table from a subquery.
supportsSubqueryOnMutatingTable
()

Does this dialect support referencing the table being mutated in a subquery?

public boolean

Returns:

True if a subselect can appear as the LHS of an in-predicate; false otherwise.
supportsSubselectAsInPredicateLHS
()

Is a subselect supported as the left-hand side (LHS) of an IN predicates?

public boolean

Returns:

True if table-level check constraints are supported; false otherwise.
supportsTableCheck
()

Does this dialect support table-level check constraints?

public boolean
supportsTemporalLiteralOffset()

Does this dialect supports timezone offsets in temporal literals.

public boolean

Returns:

true by default, since most do
supportsTemporaryTablePrimaryKey
()

Does this database support primary keys for temporary tables?

public boolean

Returns:

true by default, since most do
supportsTemporaryTables
()

Does this database have some sort of support for temporary tables?

public boolean

Returns:

true if the database supports truncation via a cast, false otherwise. The default is true.
supportsTruncateWithCast
()

Does this dialect support truncation of values to a specified length via a cast?

public boolean

Returns:

True if the database supports counting tuples; false otherwise.
supportsTupleCounts
()

Does this dialect support count(a,b)?

public boolean

Returns:

True if the database supports counting distinct tuples; false otherwise.
supportsTupleDistinctCounts
()

Does this dialect support count(distinct a,b)?

public boolean

Returns:

True if unbounded materialization is supported; false otherwise.
supportsUnboundedLobLocatorMaterialization
()

Is it supported to materialize a LOB locator outside the transaction in which it was created?

public boolean

Returns:

True if UNION ALL is supported; false otherwise.
supportsUnionAll
()

Does this dialect support UNION ALL?

public boolean

Returns:

True if UNION is supported in a subquery; false otherwise.
supportsUnionInSubquery
()

Does this dialect support UNION in a subquery.

public boolean

Returns:

true if values list are supported
supportsValuesList
()

Does this dialect support values lists of form VALUES (1), (2), (3)?

public boolean

Returns:

true if values list are allowed in insert statements
supportsValuesListForInsert
()

Does this dialect support values lists of form VALUES (1), (2), (3) in insert statements?

public boolean

Returns:

true if WAIT is supported
supportsWait
()

Does this dialect support WAIT timeout.

public boolean

Returns:

true if the underlying database supports window functions, false otherwise. The default is false.
supportsWindowFunctions
()

Does this dialect support window functions like row_number() over (..)?

public String
timestampaddPattern(TemporalUnit
The unit to add to the temporal
unit
,
TemporalType
The type of the temporal
temporalType
,
IntervalType
The type of interval to add or null if it's not a native interval
intervalType
)

Obtain a pattern for the SQL equivalent to a timestampadd() function call.

public String
timestampdiffPattern(TemporalUnit
the first argument
unit
,
TemporalType
true if the first argument is a timestamp, false if a date
fromTemporalType
,
TemporalType
true if the second argument is
toTemporalType
)

Obtain a pattern for the SQL equivalent to a timestampdiff() function call.

public String

Returns:

The appropriate SQL literal.
toBooleanValueString
(boolean
The boolean value
bool
)

The SQL literal expression representing the given boolean value.

public String

Returns:

The quoted value.
toQuotedIdentifier
(String
The value to be quoted.
name
)

Apply dialect-specific quoting.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public String

Returns:

The mutated select command, or the same as was passed in.
transformSelectString
(String
The select command
select
)

Meant as a means for end users to affect the select strings being sent to the database and perhaps manipulate them in some fashion.

public String
translateDurationField(TemporalUnit unit)

Return the name used to identify the given unit of duration as an argument to #timestampadd() or #timestampdiff(), or of this dialect's equivalent functions.

public String
translateExtractField(TemporalUnit unit)

Return the name used to identify the given field as an argument to the extract() function, or of this dialect's equivalent function.

public String
trimPattern(TrimSpec
leading or trailing
specification
,
char
the character to trim
character
)

Deprecated for removal. Use trimPattern(TrimSpec, boolean) instead.
Obtain a pattern for the SQL equivalent to a trim() function call.
public String
trimPattern(TrimSpec specification, boolean
true if the trim character is a whitespace and can be omitted, false if it must be explicit and a ?2 placeholder should be included in the pattern
isWhitespace
)

Obtain a pattern for the SQL equivalent to a trim() function call.

public boolean

Returns:

boolean
useArrayForMultiValuedParameters
()

Does this database prefer to use array types for multi-valued parameters.

public boolean

Returns:

true indicates that the dialect requests that locking be applied by subsequent select; false (the default) indicates that locking should be applied to the main SQL statement.
useFollowOnLocking
(String sql, QueryOptions queryOptions)

Some dialects have trouble applying pessimistic locking depending upon what other query options are specified (paging, ordering, etc).

public boolean

Returns:

True if BLOBs and CLOBs should be bound using stream operations.
useInputStreamToInsertBlob
()

Should LOBs (both BLOB and CLOB) be bound using stream operations, that is, using PreparedStatement#setBinaryStream).

public boolean

Returns:

true if materialized LOBs should be used for capacity exceeding types.
useMaterializedLobWhenCapacityExceeded
()

Whether to switch:

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait