Top Description Fields Constructors Methods
org.hibernate.dialect

public Class HSQLDialect

extends Dialect
Class Inheritance
Imports
java.sql.DatabaseMetaData, .SQLException, .Types, org.hibernate.boot.model.FunctionContributions, org.hibernate.dialect.function.CommonFunctionFactory, .TrimFunction, org.hibernate.dialect.identity.HSQLIdentityColumnSupport, .IdentityColumnSupport, org.hibernate.dialect.pagination.LimitHandler, .OffsetFetchLimitHandler, org.hibernate.dialect.sequence.HSQLSequenceSupport, .SequenceSupport, org.hibernate.dialect.temptable.TemporaryTable, .TemporaryTableKind, org.hibernate.dialect.unique.CreateTableUniqueDelegate, .UniqueDelegate, org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo, org.hibernate.engine.jdbc.env.spi.IdentifierHelper, .IdentifierHelperBuilder, .NameQualifierSupport, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtractor, .ViolatedConstraintNameExtractor, org.hibernate.internal.util.JdbcExceptionHelper, org.hibernate.metamodel.mapping.EntityMappingType, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.query.sqm.CastType, .IntervalType, .TemporalUnit, org.hibernate.query.sqm.mutation.internal.temptable.AfterUseAction, .BeforeUseAction, .LocalTemporaryTableInsertStrategy, .LocalTemporaryTableMutationStrategy, org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy, .SqmMultiTableMutationStrategy, org.hibernate.sql.ast.SqlAstNodeRenderingMode, .SqlAstTranslator, .SqlAstTranslatorFactory, org.hibernate.sql.ast.spi.SqlAppender, .StandardSqlAstTranslatorFactory, org.hibernate.sql.ast.tree.Statement, org.hibernate.sql.exec.spi.JdbcOperation, org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorHSQLDBDatabaseImpl, org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor, org.hibernate.type.spi.TypeConfiguration, jakarta.persistence.TemporalType

A SQL dialect for HSQLDB (HyperSQL) 2.6.1 and above.
Authors
Christoph Sturm, Phillip Baird, Fred Toussi

Field Summary

Modifier and TypeField and Description
private static final ViolatedConstraintNameExtractor
private final HSQLIdentityColumnSupport
private static final DatabaseVersion
private final UniqueDelegate
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
public

Method Summary

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

Overrides org.hibernate.dialect.Dialect.appendBooleanValueString.

Append the SQL literal expression representing the given boolean value to the given SqlAppender.
public void
appendDatetimeFormat(SqlAppender appender, String format)

Overrides org.hibernate.dialect.Dialect.appendDatetimeFormat.

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

Overrides org.hibernate.dialect.Dialect.buildIdentifierHelper.

The IdentifierHelper indicated by this dialect for handling identifier conversions.
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
)

Overrides org.hibernate.dialect.Dialect.castPattern.

Obtain a pattern for the SQL equivalent to a cast() function call.
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 String
currentTime()

Overrides org.hibernate.dialect.Dialect.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()

Overrides org.hibernate.dialect.Dialect.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()

Overrides org.hibernate.dialect.Dialect.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 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 boolean
dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

Do we need to drop constraints before dropping tables in this dialect?
public String
extractPattern(TemporalUnit
the first argument
unit
)

Overrides org.hibernate.dialect.Dialect.extractPattern.

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

Overrides org.hibernate.dialect.Dialect.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
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 FunctionalDependencyAnalysisSupport
getFunctionalDependencyAnalysisSupport()

Overrides org.hibernate.dialect.Dialect.getFunctionalDependencyAnalysisSupport.

Get this dialect's level of support for primary key functional dependency analysis within GROUP BY and ORDER BY clauses.
public IdentityColumnSupport
public LimitHandler
protected DatabaseVersion
getMinimumSupportedVersion()

Overrides org.hibernate.dialect.Dialect.getMinimumSupportedVersion.

Get the version of the SQL dialect that is the minimum supported by this implementation.
public NameQualifierSupport
public NullOrdering
getNullOrdering()

Overrides org.hibernate.dialect.Dialect.getNullOrdering.

Returns the default ordering of null.
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public String
getSelectClauseNullString(int
The Types type code.
sqlType
,
TypeConfiguration
The type configuration
typeConfiguration
)

Overrides org.hibernate.dialect.Dialect.getSelectClauseNullString.

Given a JDBC type code, return the expression for a literal null value of that type, to use in a select clause.
public SequenceInformationExtractor
public SequenceSupport
public SqlAstTranslatorFactory
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 UniqueDelegate
public ViolatedConstraintNameExtractor
public void
initializeFunctionRegistry(FunctionContributions functionContributions)

Overrides org.hibernate.dialect.Dialect.initializeFunctionRegistry.

Initialize the given registry with any dialect-specific functions.
public boolean
public String
quoteCollation(String collation)

Overrides org.hibernate.dialect.Dialect.quoteCollation.

Quote the given collation name if necessary.
protected void
registerDefaultKeywords()

Overrides org.hibernate.dialect.Dialect.registerDefaultKeywords.

Register the reserved words of ANSI-standard SQL as keywords.
public boolean
requiresFloatCastingOfIntegerDivision()

Overrides org.hibernate.dialect.Dialect.requiresFloatCastingOfIntegerDivision.

Does this dialect require that integer divisions be wrapped in cast() calls to tell the db parser the expected type.
protected Integer
resolveSqlTypeCode(String typeName, String baseTypeName, TypeConfiguration typeConfiguration)

Overrides org.hibernate.dialect.Dialect.resolveSqlTypeCode.

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

Overrides org.hibernate.dialect.Dialect.supportsCommentOn.

Does this dialect support commenting on tables and columns?
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
supportsDistinctFromPredicate()

Overrides org.hibernate.dialect.Dialect.supportsDistinctFromPredicate.

Does this dialect support some kind of distinct from predicate?
public boolean
supportsIfExistsAfterTableName()

Overrides org.hibernate.dialect.Dialect.supportsIfExistsAfterTableName.

For dropping a table, can the phrase if exists be applied after the table name?
public boolean
supportsIfExistsBeforeTableName()

Overrides org.hibernate.dialect.Dialect.supportsIfExistsBeforeTableName.

For dropping a table, can the phrase if exists be applied before the table name?
public boolean
supportsLateral()

Overrides org.hibernate.dialect.Dialect.supportsLateral.

Does this dialect support the SQL lateral keyword or a proprietary alternative?
public boolean
supportsLobValueChangePropagation()

Overrides org.hibernate.dialect.Dialect.supportsLobValueChangePropagation.

Does the dialect support propagating changes to LOB values back to the database?
public boolean
supportsLockTimeouts()

Overrides org.hibernate.dialect.Dialect.supportsLockTimeouts.

Does this dialect support specifying timeouts when requesting locks.
public boolean
public boolean
supportsOffsetInSubquery()

Overrides org.hibernate.dialect.Dialect.supportsOffsetInSubquery.

Does this dialect support offset in subqueries?
public boolean
supportsRecursiveCTE()

Overrides org.hibernate.dialect.Dialect.supportsRecursiveCTE.

Does this dialect/database support recursive CTEs?
public boolean
supportsStandardArrays()

Overrides org.hibernate.dialect.Dialect.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
supportsTupleCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleCounts.

Does this dialect support count(a,b)?
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

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

Overrides org.hibernate.dialect.Dialect.timestampaddPattern.

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
)

Overrides org.hibernate.dialect.Dialect.timestampdiffPattern.

Obtain a pattern for the SQL equivalent to a timestampdiff() function call.
public String
translateExtractField(TemporalUnit unit)

Overrides org.hibernate.dialect.Dialect.translateExtractField.

Return the name used to identify the given field as an argument to the extract() function, or of this dialect's equivalent function.
Inherited from org.hibernate.dialect.Dialect:
addSqlHintOrCommentappendArrayLiteralappendBinaryLiteralappendDateTimeLiteralappendDateTimeLiteralappendDateTimeLiteralappendIntervalLiteralappendLiteralappendLockHintappendUUIDLiteralapplyLocksToSqlaugmentPhysicalTableTypesaugmentRecognizedTableTypesbuildSQLExceptionConversionDelegatecanBatchTruncatecanCreateCatalogcanCreateSchemacanDisableConstraintscastTypecheckVersioncloseQuotecontributecontributeFunctionscontributeTypescreateOptionalTableUpdateOperationcurrentDatecurrentLocalTimecurrentLocalTimestampdefaultScrollModeequivalentTypesescapeCommentforceLobAsLastValuegeneratedAsgetAddColumnStringgetAddColumnSuffixStringgetAddForeignKeyConstraintStringgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetAggregateSupportgetAlterColumnTypeStringgetAlterTableStringgetArrayTypeNamegetAuxiliaryDatabaseObjectExportergetBatchLoadSizingStrategygetCallableStatementSupportgetCaseInsensitiveLikegetCheckConditiongetCheckConditiongetCheckConditiongetCheckConditiongetColumnAliasExtractorgetColumnCommentgetCreateCatalogCommandgetCreateEnumTypeCommandgetCreateEnumTypeCommandgetCreateIndexStringgetCreateIndexTailgetCreateMultisetTableStringgetCreateSchemaCommandgetCreateTableStringgetCreateTemporaryTableColumnAnnotationgetCreateUserDefinedTypeExtensionsStringgetCreateUserDefinedTypeKindStringgetCurrentSchemaCommandgetDefaultDecimalPrecisiongetDefaultIntervalSecondScalegetDefaultLobLengthgetDefaultNonContextualLobCreationgetDefaultPropertiesgetDefaultTimestampPrecisiongetDefaultUseGetGeneratedKeysgetDisableConstraintsStatementgetDisableConstraintStatementgetDmlTargetColumnQualifierSupportgetDoublePrecisiongetDropCatalogCommandgetDropEnumTypeCommandgetDropEnumTypeCommandgetDropForeignKeyStringgetDropSchemaCommandgetDropTableStringgetDropUniqueKeyStringgetEnableConstraintsStatementgetEnableConstraintStatementgetEnumTypeDeclarationgetEnumTypeDeclarationgetFallbackSchemaManagementToolgetFloatPrecisiongetForeignKeyExportergetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFractionalSecondPrecisionInNanosgetGroupBySelectItemReferenceStrategygetHqlTranslatorgetIndexExportergetInExpressionCountLimitgetKeywordsgetLobMergeStrategygetLockingStrategygetLockRowIdentifiergetLowercaseFunctiongetMaxAliasLengthgetMaxIdentifierLengthgetMaxNVarcharCapacitygetMaxNVarcharLengthgetMaxVarbinaryCapacitygetMaxVarbinaryLengthgetMaxVarcharCapacitygetMaxVarcharLengthgetMultiKeyLoadSizingStrategygetNationalizationSupportgetNativeIdentifierGeneratorStrategygetNativeParameterMarkerStrategygetNoColumnsInsertStringgetNullColumnStringgetNullColumnStringgetParameterCountLimitgetPreferredSqlTypeCodeForArraygetPreferredSqlTypeCodeForBooleangetQueryHintStringgetQueryHintStringgetReadLockStringgetReadLockStringgetReadRowLockStrategygetResultSetgetResultSetgetResultSetgetRowIdColumnStringgetSchemaNameResolvergetSelectGUIDStringgetSequenceExportergetSizeStrategygetSqmTranslatorFactorygetTableCleanergetTableCommentgetTableExportergetTableMigratorgetTableTypeStringgetTemporaryTableCreateOptionsgetTemporaryTableDdlTransactionHandlinggetTemporaryTableDropCommandgetTemporaryTableExportergetTemporaryTableTruncateCommandgetTimeoutInSecondsgetTimeZoneSupportgetTruncateTableStatementgetTruncateTableStatementsgetUniqueKeyExportergetUserDefinedTypeCommentgetUserDefinedTypeExportergetVersiongetWriteLockStringgetWriteLockStringgetWriteRowLockStrategyhasAlterTablehasDataTypeBeforeGeneratedAshasSelfReferentialForeignKeyBuginitDefaultPropertiesinlineLiteralisAnsiNullOnisEmptyStringTreatedAsNullisJdbcLogWarningsEnabledByDefaultisLobisLockTimeoutParameterizedopenQuoteordinalprependCommentqualifyIndexNamequoteregisterColumnTypesregisterKeywordregisterKeywordsregisterResultSetOutParameterregisterResultSetOutParameterrequiresCastForConcatenatingNonStringsrequiresParensForTupleCountsrequiresParensForTupleDistinctCountsresolveSqlTypeCoderesolveSqlTypeDescriptorresolveSqlTypeLengthrowIdrowIdSqlTypesupportsAlterColumnTypesupportsBatchUpdatessupportsBindAsCallableArgumentsupportsBitTypesupportsCascadeDeletesupportsCaseInsensitiveLikesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsFetchClausesupportsFractionalTimestampArithmeticsupportsIfExistsAfterAlterTablesupportsIfExistsAfterConstraintNamesupportsIfExistsAfterTypeNamesupportsIfExistsBeforeConstraintNamesupportsIfExistsBeforeTypeNamesupportsInsertReturningsupportsInsertReturningGeneratedKeyssupportsIsTruesupportsJdbcConnectionLobCreationsupportsMaterializedLobAccesssupportsNoColumnsInsertsupportsNonQueryWithCTEsupportsNoWaitsupportsNullPrecedencesupportsOrderByInSubquerysupportsOrdinalSelectItemReferencesupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsPartitionBysupportsPredicateAsExpressionsupportsRefCursorssupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsSkipLockedsupportsStandardCurrentTimestampFunctionsupportsSubqueryInSelectsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTemporalLiteralOffsetsupportsTemporaryTablePrimaryKeysupportsTemporaryTablessupportsTruncateWithCastsupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUnionInSubquerysupportsValuesListsupportsValuesListForInsertsupportsWaitsupportsWindowFunctionstoBooleanValueStringtoQuotedIdentifiertoStringtransformSelectStringtranslateDurationFieldtrimPatterntrimPatternuseArrayForMultiValuedParametersuseFollowOnLockinguseInputStreamToInsertBlobuseMaterializedLobWhenCapacityExceeded