Top Description Fields Constructors Methods
org.hibernate.dialect

public abstract Class AbstractTransactSQLDialect

extends Dialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.SQLServerDialect, org.hibernate.dialect.SybaseDialect
Imports
org.hibernate.LockMode, .LockOptions, org.hibernate.boot.model.FunctionContributions, org.hibernate.dialect.function.CastingConcatFunction, .TransactSQLStrFunction, .CommonFunctionFactory, .CaseLeastGreatestEmulation, org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo, org.hibernate.dialect.identity.AbstractTransactSQLIdentityColumnSupport, .IdentityColumnSupport, org.hibernate.metamodel.mapping.EntityMappingType, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.query.sqm.TrimSpec, org.hibernate.query.sqm.mutation.internal.temptable.AfterUseAction, .BeforeUseAction, .LocalTemporaryTableInsertStrategy, .LocalTemporaryTableMutationStrategy, org.hibernate.dialect.temptable.TemporaryTable, .TemporaryTableKind, org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy, .SqmMultiTableMutationStrategy, org.hibernate.sql.ast.SqlAstNodeRenderingMode, org.hibernate.sql.ast.spi.SqlAppender, org.hibernate.type.descriptor.java.PrimitiveByteArrayJavaType, org.hibernate.type.descriptor.jdbc.JdbcType, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry, java.sql.CallableStatement, .ResultSet, .SQLException, .Types, java.util.Map

An abstract base class for Sybase and MS SQL Server dialects.
Author
Gavin King

Field Summary

Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTELEGACY_LOB_MERGE_STRATEGYLOG_BASE2OF10NEW_LOCATOR_LOB_MERGE_STRATEGYQUOTESTANDARD_MULTI_KEY_LOAD_SIZING_STRATEGYSTREAM_XFER_LOB_MERGE_STRATEGY

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
appendBinaryLiteral(SqlAppender appender, byte[] bytes)

Overrides org.hibernate.dialect.Dialect.appendBinaryLiteral.

Append a binary literal to the given SqlAppender.
public String
appendLockHint(LockOptions
The lock options to apply
lockOptions
,
String
The name of the table to which to apply the lock hint.
tableName
)

Overrides org.hibernate.dialect.Dialect.appendLockHint.

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 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
)

Overrides org.hibernate.dialect.Dialect.applyLocksToSql.

Modifies the given SQL, applying the appropriate updates for the specified lock modes and key columns.
protected String
columnType(int
a SQL type code
sqlTypeCode
)

Overrides org.hibernate.dialect.Dialect.columnType.

The database column type name for a given JDBC type code defined in Types or SqlTypes.
public boolean
doesReadCommittedCauseWritersToBlockReaders()

Overrides org.hibernate.dialect.Dialect.doesReadCommittedCauseWritersToBlockReaders.

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

Overrides org.hibernate.dialect.Dialect.doesRepeatableReadCauseReadersToBlockWriters.

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

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The subcommand of the alter table command used to add a column to a table, usually add column or add.
public String
getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

The command used to retrieve the current timestamp from the database.
public int
getDefaultStatementBatchSize()

Overrides org.hibernate.dialect.Dialect.getDefaultStatementBatchSize.

The default value to use for the configuration property hibernate.jdbc.batch_size.
public SqmMultiTableInsertStrategy
public SqmMultiTableMutationStrategy
public String
getForUpdateString()

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the string to append to SELECT statements to acquire pessimistic UPGRADE locks for this dialect.
public IdentityColumnSupport
public NullOrdering
getNullOrdering()

Overrides org.hibernate.dialect.Dialect.getNullOrdering.

Returns the default ordering of null.
public int
getPreferredSqlTypeCodeForBoolean()

Overrides org.hibernate.dialect.Dialect.getPreferredSqlTypeCodeForBoolean.

The JDBC type code to use for mapping properties of Java type boolean.
public ResultSet
getResultSet(CallableStatement
The callable statement.
ps
)

Overrides org.hibernate.dialect.Dialect.getResultSet.

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the OUT parameter.
public String
getSelectGUIDString()

Overrides org.hibernate.dialect.Dialect.getSelectGUIDString.

Get the command used to select a GUID from the database.
public TemporaryTableKind
getSupportedTemporaryTableKind()

Overrides org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

The kind of temporary tables that are supported on this database.
public AfterUseAction
getTemporaryTableAfterUseAction()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableAfterUseAction.

The action to take after finishing use of a temporary table.
public BeforeUseAction
getTemporaryTableBeforeUseAction()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableBeforeUseAction.

The action to take before beginning use of a temporary table.
public String
public RowLockStrategy
public void
initializeFunctionRegistry(FunctionContributions functionContributions)

Overrides org.hibernate.dialect.Dialect.initializeFunctionRegistry.

Initialize the given registry with any dialect-specific functions.
public boolean
public boolean
qualifyIndexName()

Overrides org.hibernate.dialect.Dialect.qualifyIndexName.

Do we need to qualify index names with the schema name?
public int
registerResultSetOutParameter(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
col
)

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

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 static String
replaceLtrimRtrim(TrimSpec specification, char character)

Deprecated for removal. Use replaceLtrimRtrim(TrimSpec, boolean) instead.
public static String
replaceLtrimRtrim(TrimSpec specification, boolean isWhitespace)

public boolean
requiresCastForConcatenatingNonStrings()

Overrides org.hibernate.dialect.Dialect.requiresCastForConcatenatingNonStrings.

Does this dialect/database require casting of non-string arguments in the concat() function?
public JdbcType
resolveSqlTypeDescriptor(String
the column type name
columnTypeName
,
int jdbcTypeCode, int
the precision or 0
precision
,
int
the scale or 0
scale
,
JdbcTypeRegistry jdbcTypeRegistry)

Overrides org.hibernate.dialect.Dialect.resolveSqlTypeDescriptor.

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 boolean
supportsCurrentTimestampSelection()

Overrides org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

Does this dialect support some way to retrieve the current timestamp value from the database?
public boolean
supportsExistsInSelect()

Overrides org.hibernate.dialect.Dialect.supportsExistsInSelect.

Does the dialect support an exists statement in the select clause?
public boolean
supportsPartitionBy()

Overrides org.hibernate.dialect.Dialect.supportsPartitionBy.

Does is dialect support partition by?
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support count(distinct a,b)?
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
)

Overrides org.hibernate.dialect.Dialect.trimPattern.

Obtain a pattern for the SQL equivalent to a trim() function call.
Inherited from org.hibernate.dialect.Dialect:
addSqlHintOrCommentappendArrayLiteralappendBooleanValueStringappendDatetimeFormatappendDateTimeLiteralappendDateTimeLiteralappendDateTimeLiteralappendIntervalLiteralappendLiteralappendUUIDLiteralaugmentPhysicalTableTypesaugmentRecognizedTableTypesbuildIdentifierHelperbuildSQLExceptionConversionDelegatecanBatchTruncatecanCreateCatalogcanCreateSchemacanDisableConstraintscastPatterncastTypecheckVersioncloseQuotecontributecontributeFunctionscontributeTypescreateOptionalTableUpdateOperationcurrentDatecurrentLocalTimecurrentLocalTimestampcurrentTimecurrentTimestampcurrentTimestampWithTimeZonedefaultScrollModedropConstraintsequivalentTypesescapeCommentextractPatternforceLobAsLastValuegeneratedAsgetAddColumnSuffixStringgetAddForeignKeyConstraintStringgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetAggregateSupportgetAlterColumnTypeStringgetAlterTableStringgetArrayTypeNamegetAuxiliaryDatabaseObjectExportergetBatchLoadSizingStrategygetCallableStatementSupportgetCascadeConstraintsStringgetCaseInsensitiveLikegetCheckConditiongetCheckConditiongetCheckConditiongetCheckConditiongetColumnAliasExtractorgetColumnCommentgetCreateCatalogCommandgetCreateEnumTypeCommandgetCreateEnumTypeCommandgetCreateIndexStringgetCreateIndexTailgetCreateMultisetTableStringgetCreateSchemaCommandgetCreateTableStringgetCreateTemporaryTableColumnAnnotationgetCreateUserDefinedTypeExtensionsStringgetCreateUserDefinedTypeKindStringgetCurrentSchemaCommandgetDefaultDecimalPrecisiongetDefaultIntervalSecondScalegetDefaultLobLengthgetDefaultNonContextualLobCreationgetDefaultPropertiesgetDefaultTimestampPrecisiongetDefaultUseGetGeneratedKeysgetDisableConstraintsStatementgetDisableConstraintStatementgetDmlTargetColumnQualifierSupportgetDoublePrecisiongetDropCatalogCommandgetDropEnumTypeCommandgetDropEnumTypeCommandgetDropForeignKeyStringgetDropSchemaCommandgetDropTableStringgetDropUniqueKeyStringgetEnableConstraintsStatementgetEnableConstraintStatementgetEnumTypeDeclarationgetEnumTypeDeclarationgetFallbackSchemaManagementToolgetFloatPrecisiongetForeignKeyExportergetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFractionalSecondPrecisionInNanosgetFunctionalDependencyAnalysisSupportgetGroupBySelectItemReferenceStrategygetHqlTranslatorgetIndexExportergetInExpressionCountLimitgetKeywordsgetLimitHandlergetLobMergeStrategygetLockingStrategygetLockRowIdentifiergetLowercaseFunctiongetMaxAliasLengthgetMaxIdentifierLengthgetMaxNVarcharCapacitygetMaxNVarcharLengthgetMaxVarbinaryCapacitygetMaxVarbinaryLengthgetMaxVarcharCapacitygetMaxVarcharLengthgetMinimumSupportedVersiongetMultiKeyLoadSizingStrategygetNameQualifierSupportgetNationalizationSupportgetNativeIdentifierGeneratorStrategygetNativeParameterMarkerStrategygetNoColumnsInsertStringgetNullColumnStringgetNullColumnStringgetParameterCountLimitgetPreferredSqlTypeCodeForArraygetQueryHintStringgetQueryHintStringgetQuerySequencesStringgetReadLockStringgetReadLockStringgetReadRowLockStrategygetResultSetgetResultSetgetRowIdColumnStringgetSchemaNameResolvergetSelectClauseNullStringgetSequenceExportergetSequenceInformationExtractorgetSequenceSupportgetSizeStrategygetSqlAstTranslatorFactorygetSqmTranslatorFactorygetTableCleanergetTableCommentgetTableExportergetTableMigratorgetTableTypeStringgetTemporaryTableCreateOptionsgetTemporaryTableDdlTransactionHandlinggetTemporaryTableDropCommandgetTemporaryTableExportergetTemporaryTableTruncateCommandgetTimeoutInSecondsgetTimeZoneSupportgetTruncateTableStatementgetTruncateTableStatementsgetUniqueDelegategetUniqueKeyExportergetUserDefinedTypeCommentgetUserDefinedTypeExportergetVersiongetViolatedConstraintNameExtractorgetWriteLockStringgetWriteLockStringhasAlterTablehasDataTypeBeforeGeneratedAshasSelfReferentialForeignKeyBuginitDefaultPropertiesinlineLiteralisAnsiNullOnisEmptyStringTreatedAsNullisJdbcLogWarningsEnabledByDefaultisLobisLockTimeoutParameterizedopenQuoteordinalprependCommentquotequoteCollationregisterColumnTypesregisterDefaultKeywordsregisterKeywordregisterKeywordsregisterResultSetOutParameterrequiresFloatCastingOfIntegerDivisionrequiresParensForTupleCountsrequiresParensForTupleDistinctCountsresolveSqlTypeCoderesolveSqlTypeCoderesolveSqlTypeLengthrowIdrowIdSqlTypesupportsAlterColumnTypesupportsBatchUpdatessupportsBindAsCallableArgumentsupportsBitTypesupportsCascadeDeletesupportsCaseInsensitiveLikesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsCommentOnsupportsDistinctFromPredicatesupportsExpectedLobUsagePatternsupportsFetchClausesupportsFractionalTimestampArithmeticsupportsIfExistsAfterAlterTablesupportsIfExistsAfterConstraintNamesupportsIfExistsAfterTableNamesupportsIfExistsAfterTypeNamesupportsIfExistsBeforeConstraintNamesupportsIfExistsBeforeTableNamesupportsIfExistsBeforeTypeNamesupportsInsertReturningsupportsInsertReturningGeneratedKeyssupportsIsTruesupportsJdbcConnectionLobCreationsupportsLateralsupportsLobValueChangePropagationsupportsLockTimeoutssupportsMaterializedLobAccesssupportsNamedParameterssupportsNoColumnsInsertsupportsNonQueryWithCTEsupportsNoWaitsupportsNullPrecedencesupportsOffsetInSubquerysupportsOrderByInSubquerysupportsOrdinalSelectItemReferencesupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsPredicateAsExpressionsupportsRecursiveCTEsupportsRefCursorssupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsSkipLockedsupportsStandardArrayssupportsStandardCurrentTimestampFunctionsupportsSubqueryInSelectsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTemporalLiteralOffsetsupportsTemporaryTablePrimaryKeysupportsTemporaryTablessupportsTruncateWithCastsupportsTupleCountssupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUnionInSubquerysupportsValuesListsupportsValuesListForInsertsupportsWaitsupportsWindowFunctionstimestampaddPatterntimestampdiffPatterntoBooleanValueStringtoQuotedIdentifiertoStringtransformSelectStringtranslateDurationFieldtranslateExtractFieldtrimPatternuseArrayForMultiValuedParametersuseFollowOnLockinguseInputStreamToInsertBlobuseMaterializedLobWhenCapacityExceeded

Constructor Detail

AbstractTransactSQLDialectback to summary
public AbstractTransactSQLDialect(DatabaseVersion version)
AbstractTransactSQLDialectback to summary
public AbstractTransactSQLDialect(DialectResolutionInfo info)

Method Detail

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

Overrides org.hibernate.dialect.Dialect.appendBinaryLiteral.

Doc from org.hibernate.dialect.Dialect.appendBinaryLiteral.

Append a binary literal to the given SqlAppender.

Annotations
@Override
appendLockHintback to summary
public String appendLockHint(LockOptions lockOptions, String tableName)

Overrides org.hibernate.dialect.Dialect.appendLockHint.

Doc from org.hibernate.dialect.Dialect.appendLockHint.

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

Parameters
lockOptions:LockOptions

The lock options to apply

tableName:String

The name of the table to which to apply the lock hint.

Returns:String

The table with any required lock hints.

Annotations
@Override
applyLocksToSqlback to summary
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames)

Overrides org.hibernate.dialect.Dialect.applyLocksToSql.

Doc from org.hibernate.dialect.Dialect.applyLocksToSql.

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

This allows emulation of SELECT FOR UPDATE for dialects which do not support the standard syntax.

Parameters
sql:String

the SQL string to modify

aliasedLockOptions:LockOptions

lock options indexed by aliased table names.

keyColumnNames:Map<String, String[]>

a map of key columns indexed by aliased table names.

Returns:String

the modified SQL string.

Annotations
@Override
columnTypeback to summary
protected String columnType(int sqlTypeCode)

Overrides org.hibernate.dialect.Dialect.columnType.

Doc from org.hibernate.dialect.Dialect.columnType.

The database column type name for a given JDBC type code defined in Types or SqlTypes. This default implementation returns the ANSI-standard type name.

This method may be overridden by concrete Dialects as an alternative to registerColumnTypes(TypeContributions, ServiceRegistry) for simple registrations.

Note that:

  1. Implementations of this method are expected to define a sensible mapping forTypes#NCLOB Types#NCHAR, and Types#NVARCHAR. On some database, these types are simply remapped to CLOB, CHAR, and VARCHAR.
  2. Mappings for Types#TIMESTAMP and Types#TIMESTAMP_WITH_TIMEZONE should support explicit specification of precision if possible.
  3. As specified by DdlTypeRegistry#getDescriptor(int), this method never receives Types#LONGVARCHAR, Types#LONGNVARCHAR, nor Types#LONGVARBINARY, which are considered synonyms for their non-LONG counterparts.
  4. On the other hand, the types SqlTypes#LONG32VARCHAR, SqlTypes#LONG32NVARCHAR, and SqlTypes#LONG32VARBINARY are not synonyms, and implementations of this method must define sensible mappings, for example to database-native TEXT or CLOB types.
Parameters
sqlTypeCode:int

a SQL type code

Returns:String

a column type name, with $l, $p, $s placeholders for length, precision, scale

Annotations
@Override
doesReadCommittedCauseWritersToBlockReadersback to summary
public boolean doesReadCommittedCauseWritersToBlockReaders()

Overrides org.hibernate.dialect.Dialect.doesReadCommittedCauseWritersToBlockReaders.

Doc from org.hibernate.dialect.Dialect.doesReadCommittedCauseWritersToBlockReaders.

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

Returns:boolean

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

Annotations
@Override
doesRepeatableReadCauseReadersToBlockWritersback to summary
public boolean doesRepeatableReadCauseReadersToBlockWriters()

Overrides org.hibernate.dialect.Dialect.doesRepeatableReadCauseReadersToBlockWriters.

Doc from org.hibernate.dialect.Dialect.doesRepeatableReadCauseReadersToBlockWriters.

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

Returns:boolean

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

Annotations
@Override
getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

Doc from org.hibernate.dialect.Dialect.getAddColumnString.

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

Returns:String

The add column fragment.

Annotations
@Override
getCurrentTimestampSelectStringback to summary
public String getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

Doc from org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

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

Annotations
@Override
getDefaultStatementBatchSizeback to summary
public int getDefaultStatementBatchSize()

Overrides org.hibernate.dialect.Dialect.getDefaultStatementBatchSize.

Doc from org.hibernate.dialect.Dialect.getDefaultStatementBatchSize.

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

Annotations
@Override
getFallbackSqmInsertStrategyback to summary
public SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)

Overrides org.hibernate.dialect.Dialect.getFallbackSqmInsertStrategy.

Doc from org.hibernate.dialect.Dialect.getFallbackSqmInsertStrategy.

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

The SqmMultiTableInsertStrategy to use when not specified by org.hibernate.query.spi.QueryEngineOptions#getCustomSqmMultiTableInsertStrategy.

Annotations
@Override
getFallbackSqmMutationStrategyback to summary
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)

Overrides org.hibernate.dialect.Dialect.getFallbackSqmMutationStrategy.

Doc from org.hibernate.dialect.Dialect.getFallbackSqmMutationStrategy.

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

The SqmMultiTableMutationStrategy to use when not specified by org.hibernate.query.spi.QueryEngineOptions#getCustomSqmMultiTableMutationStrategy.

Annotations
@Override
getForUpdateStringback to summary
public String getForUpdateString()

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Doc from org.hibernate.dialect.Dialect.getForUpdateString.

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

Returns:String

The appropriate FOR UPDATE clause string.

Annotations
@Override
getIdentityColumnSupportback to summary
public IdentityColumnSupport getIdentityColumnSupport()

Overrides org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Doc from org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Get the appropriate IdentityColumnSupport for this dialect.

Returns:IdentityColumnSupport

the IdentityColumnSupport

Annotations
@Override
getNullOrderingback to summary
public NullOrdering getNullOrdering()

Overrides org.hibernate.dialect.Dialect.getNullOrdering.

Doc from org.hibernate.dialect.Dialect.getNullOrdering.

Returns the default ordering of null.

Annotations
@Override
getPreferredSqlTypeCodeForBooleanback to summary
public int getPreferredSqlTypeCodeForBoolean()

Overrides org.hibernate.dialect.Dialect.getPreferredSqlTypeCodeForBoolean.

Doc from org.hibernate.dialect.Dialect.getPreferredSqlTypeCodeForBoolean.

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

Usually Types#BOOLEAN or Types#BIT.

Returns:int

one of the type codes defined by Types.

Annotations
@Override
getResultSetback to summary
public ResultSet getResultSet(CallableStatement ps) throws SQLException

Overrides org.hibernate.dialect.Dialect.getResultSet.

Doc from org.hibernate.dialect.Dialect.getResultSet.

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

Parameters
ps:CallableStatement

The callable statement.

Returns:ResultSet

The extracted result set.

Annotations
@Override
Exceptions
SQLException:
Indicates problems extracting the result set.
getSelectGUIDStringback to summary
public String getSelectGUIDString()

Overrides org.hibernate.dialect.Dialect.getSelectGUIDString.

Doc from org.hibernate.dialect.Dialect.getSelectGUIDString.

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

Optional operation.

Returns:String

The appropriate command.

Annotations
@Override
getSupportedTemporaryTableKindback to summary
public TemporaryTableKind getSupportedTemporaryTableKind()

Overrides org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

Doc from org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

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

Annotations
@Override
getTemporaryTableAfterUseActionback to summary
public AfterUseAction getTemporaryTableAfterUseAction()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableAfterUseAction.

Doc from org.hibernate.dialect.Dialect.getTemporaryTableAfterUseAction.

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

Annotations
@Override
getTemporaryTableBeforeUseActionback to summary
public BeforeUseAction getTemporaryTableBeforeUseAction()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableBeforeUseAction.

Doc from org.hibernate.dialect.Dialect.getTemporaryTableBeforeUseAction.

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

Annotations
@Override
getTemporaryTableCreateCommandback to summary
public String getTemporaryTableCreateCommand()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableCreateCommand.

Doc from org.hibernate.dialect.Dialect.getTemporaryTableCreateCommand.

The command to create a temporary table.

Annotations
@Override
getWriteRowLockStrategyback to summary
public RowLockStrategy getWriteRowLockStrategy()

Overrides org.hibernate.dialect.Dialect.getWriteRowLockStrategy.

Doc from org.hibernate.dialect.Dialect.getWriteRowLockStrategy.

The row lock strategy to use for write locks.

Annotations
@Override
initializeFunctionRegistryback to summary
public void initializeFunctionRegistry(FunctionContributions functionContributions)

Overrides org.hibernate.dialect.Dialect.initializeFunctionRegistry.

Doc from org.hibernate.dialect.Dialect.initializeFunctionRegistry.

Initialize the given registry with any dialect-specific functions.

Support for certain SQL functions is required, and if the database does not support a required function, then the dialect must define a way to emulate it.

These required functions include the functions defined by the JPA query language specification:

  • avg(arg) - aggregate function
  • count([distinct ]arg) - aggregate function
  • max(arg) - aggregate function
  • min(arg) - aggregate function
  • sum(arg) - aggregate function
  • coalesce(arg0, arg1, ...)
  • nullif(arg0, arg1)
  • lower(arg)
  • upper(arg)
  • length(arg)
  • concat(arg0, arg1, ...)
  • locate(pattern, string[, start])
  • substring(string, start[, length])
  • trim([[spec ][character ]from] string)
  • abs(arg)
  • mod(arg0, arg1)
  • sqrt(arg)
  • current date
  • current time
  • current timestamp
Along with an additional set of functions defined by ANSI SQL:
  • any(arg) - aggregate function
  • every(arg) - aggregate function
  • var_samp(arg) - aggregate function
  • var_pop(arg) - aggregate function
  • stddev_samp(arg) - aggregate function
  • stddev_pop(arg) - aggregate function
  • cast(arg as Type)
  • extract(field from arg)
  • ln(arg)
  • exp(arg)
  • power(arg0, arg1)
  • floor(arg)
  • ceiling(arg)
  • position(pattern in string)
  • substring(string from start[ for length])
  • overlay(string placing replacement from start[ for length])
And the following functions for working with java.time types:
  • local date
  • local time
  • local datetime
  • offset datetime
  • instant
And a number of additional "standard" functions:
  • left(string, length)
  • right(string, length)
  • replace(string, pattern, replacement)
  • pad(string with length spec[ character])
  • repeat(string, times)
  • pi
  • log10(arg)
  • log(base, arg)
  • sign(arg)
  • sin(arg)
  • cos(arg)
  • tan(arg)
  • asin(arg)
  • acos(arg)
  • atan(arg)
  • atan2(arg0, arg1)
  • round(arg0[, arg1])
  • truncate(arg0[, arg1])
  • sinh(arg)
  • tanh(arg)
  • cosh(arg)
  • least(arg0, arg1, ...)
  • greatest(arg0, arg1, ...)
  • degrees(arg)
  • radians(arg)
  • format(datetime as pattern)
  • collate(string as collation)
  • str(arg) - synonym of cast(a as String)
  • ifnull(arg0, arg1) - synonym of coalesce(a, b)
Finally, the following functions are defined as abbreviations for extract(), and desugared by the parser:
  • second(arg) - synonym of extract(second from a)
  • minute(arg) - synonym of extract(minute from a)
  • hour(arg) - synonym of extract(hour from a)
  • day(arg) - synonym of extract(day from a)
  • month(arg) - synonym of extract(month from a)
  • year(arg) - synonym of extract(year from a)
Note that according to this definition, the second() function returns a floating point value, contrary to the integer type returned by the native function with this name on many databases. Thus, we don't just naively map these HQL functions to the native SQL functions with the same names.
Annotations
@Override
isCurrentTimestampSelectStringCallableback to summary
public boolean isCurrentTimestampSelectStringCallable()

Overrides org.hibernate.dialect.Dialect.isCurrentTimestampSelectStringCallable.

Doc from org.hibernate.dialect.Dialect.isCurrentTimestampSelectStringCallable.

Is the command returned by getCurrentTimestampSelectString treated as callable?

Typically, this indicates the use of the JDBC escape syntax.

Returns:boolean

if the getCurrentTimestampSelectString is treated as callable; false otherwise.

Annotations
@Override
qualifyIndexNameback to summary
public boolean qualifyIndexName()

Overrides org.hibernate.dialect.Dialect.qualifyIndexName.

Doc from org.hibernate.dialect.Dialect.qualifyIndexName.

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

Returns:boolean

true if we do

Annotations
@Override
registerResultSetOutParameterback to summary
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Doc from org.hibernate.dialect.Dialect.registerResultSetOutParameter.

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

Parameters
statement:CallableStatement

The callable statement.

col:int

The bind position at which to register the output param.

Returns:int

The number of (contiguous) bind positions used.

Annotations
@Override
Exceptions
SQLException:
Indicates problems registering the param.
replaceLtrimRtrimback to summary
public static String replaceLtrimRtrim(TrimSpec specification, char character)

Deprecated

for removal.

Use replaceLtrimRtrim(TrimSpec, boolean) instead.

Annotations
@Deprecated
forRemoval:true
replaceLtrimRtrimback to summary
public static String replaceLtrimRtrim(TrimSpec specification, boolean isWhitespace)
requiresCastForConcatenatingNonStringsback to summary
public boolean requiresCastForConcatenatingNonStrings()

Overrides org.hibernate.dialect.Dialect.requiresCastForConcatenatingNonStrings.

Doc from org.hibernate.dialect.Dialect.requiresCastForConcatenatingNonStrings.

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

Returns:boolean

true if casting using cast() is required

Annotations
@Override
resolveSqlTypeDescriptorback to summary
public JdbcType resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, JdbcTypeRegistry jdbcTypeRegistry)

Overrides org.hibernate.dialect.Dialect.resolveSqlTypeDescriptor.

Doc from org.hibernate.dialect.Dialect.resolveSqlTypeDescriptor.

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

Parameters
columnTypeName:String

the column type name

jdbcTypeCode:int

the type code

precision:int

the precision or 0

scale:int

the scale or 0

Returns:JdbcType

an appropriate instance of JdbcType

Annotations
@Override
supportsCurrentTimestampSelectionback to summary
public boolean supportsCurrentTimestampSelection()

Overrides org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

Doc from org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

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

Returns:boolean

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

Annotations
@Override
supportsExistsInSelectback to summary
public boolean supportsExistsInSelect()

Overrides org.hibernate.dialect.Dialect.supportsExistsInSelect.

Doc from org.hibernate.dialect.Dialect.supportsExistsInSelect.

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

Returns:boolean

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

Annotations
@Override
supportsPartitionByback to summary
public boolean supportsPartitionBy()

Overrides org.hibernate.dialect.Dialect.supportsPartitionBy.

Doc from org.hibernate.dialect.Dialect.supportsPartitionBy.

Does is dialect support partition by?

Annotations
@Override
supportsTupleDistinctCountsback to summary
public boolean supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Doc from org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

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

Returns:boolean

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

Annotations
@Override
trimPatternback to summary
public String trimPattern(TrimSpec specification, boolean isWhitespace)

Overrides org.hibernate.dialect.Dialect.trimPattern.

Doc from org.hibernate.dialect.Dialect.trimPattern.

Obtain a pattern for the SQL equivalent to a trim() function call. The resulting pattern must contain a ?1 placeholder for the argument of type String and a ?2 placeholder for the trim character if isWhitespace was false.

Parameters
specification:TrimSpec

leading, trailing or both

isWhitespace: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

Annotations
@Override