Top Description Inners Fields Constructors Methods
org.hibernate.dialect

public Class HSQLDialect

extends Dialect
Class Inheritance
Imports
java.sql.SQLException, .Types, java.io.Serializable, org.hibernate.LockMode, .StaleObjectStateException, .JDBCException, org.hibernate.engine.SessionImplementor, org.hibernate.persister.entity.Lockable, org.hibernate.cfg.Environment, org.hibernate.dialect.function.AvgWithArgumentCastFunction, .SQLFunctionTemplate, .NoArgSQLFunction, .StandardSQLFunction, .VarArgsSQLFunction, org.hibernate.dialect.lock.*, org.hibernate.exception.JDBCExceptionHelper, .TemplatedViolatedConstraintNameExtracter, .ViolatedConstraintNameExtracter, org.hibernate.type.StandardBasicTypes, org.hibernate.util.ReflectHelper, org.slf4j.Logger, .LoggerFactory

An SQL dialect compatible with HSQLDB (HyperSQL).

Note this version supports HSQLDB version 1.8 and higher, only.

Enhancements to version 3.5.0 GA to provide basic support for both HSQLDB 1.8.x and 2.x Does not works with Hibernate 3.2 - 3.4 without alteration.

Authors
Christoph Sturm, Phillip Baird, Fred Toussi

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static ViolatedConstraintNameExtracter
private static ViolatedConstraintNameExtracter
EXTRACTER_20

HSQLDB 2.0 messages have changed messages may be localized - therefore use the common, non-locale element " table: "

private int
hsqldbVersion

version is 18 for 1.8 or 20 for 2.0

private static final Logger
Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTEDEFAULT_BATCH_SIZENO_BATCHQUOTE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
bindLimitParametersFirst()

Overrides org.hibernate.dialect.Dialect.bindLimitParametersFirst.

Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
public boolean

Returns:

True if writers block readers to achieve READ_COMMITTED; false otherwise.
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

Returns:

True if readers block writers to achieve REPEATABLE_READ; false otherwise.
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

Returns:

True if the table should be dropped.
dropTemporaryTableAfterUse
()

Overrides org.hibernate.dialect.Dialect.dropTemporaryTableAfterUse.

Do we need to drop the temporary table after use?
public String

Returns:

The generated temp table name.
generateTemporaryTableName
(String
The table name from which to base the temp table name.
baseTableName
)

Overrides org.hibernate.dialect.Dialect.generateTemporaryTableName.

With HSQLDB 2.0, the table name is qualified with MODULE to assist the drop statement (in-case there is a global name beginning with HT_)
public String
getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).
protected String
getCreateSequenceString(String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Typically dialects which support sequences can create a sequence with a single command.
public String

Returns:

Any required postfix.
getCreateTemporaryTablePostfix
()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

No fragment is needed if data is not needed beyond commit, otherwise should add "on commit preserve rows"
public String

Returns:

The command used to create a temporary table.
getCreateTemporaryTableString
()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTableString.

Command used to create a temporary table.
public String

Returns:

The command.
getCurrentTimestampSelectString
()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

Retrieve the command used to retrieve the current timestamp from the database.
public String

Returns:

The function name.
getCurrentTimestampSQLFunctionName
()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSQLFunctionName.

The name of the database-specific SQL function for retrieving the current timestamp.
protected String
getDropSequenceString(String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command.
public String

Returns:

The command used to drop a temporary table.
getDropTemporaryTableString
()

Overrides org.hibernate.dialect.Dialect.getDropTemporaryTableString.

Command used to drop a temporary table.
public String
getForUpdateString()

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the string to append to SELECT statements to acquire locks for this dialect.
public String
getIdentityColumnString()

Overrides org.hibernate.dialect.Dialect.getIdentityColumnString.

The syntax used during DDL to define a column as being an IDENTITY.
public String
getIdentityInsertString()

Overrides org.hibernate.dialect.Dialect.getIdentityInsertString.

The keyword used to insert a generated value into an identity column (or null).
public String
getIdentitySelectString()

Overrides org.hibernate.dialect.Dialect.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value.
public String
getLimitString(String
The query to which to apply the limit.
sql
,
boolean
Is the query requesting an offset?
hasOffset
)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Apply s limit clause to the query.
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
)

Overrides org.hibernate.dialect.Dialect.getLockingStrategy.

For HSQLDB 2.0, this is a copy of the base class implementation.
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 java.sql.Types type code.
sqlType
)

Overrides org.hibernate.dialect.Dialect.getSelectClauseNullString.

Given a java.sql.Types type code, determine an appropriate null value to use in a select clause.
public String
getSelectSequenceNextValString(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
public String
getSequenceNextValString(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

Generate the appropriate select statement to to retrieve the next value of a sequence.
public ViolatedConstraintNameExtracter
public boolean

Returns:

True if the getCurrentTimestampSelectString return is callable; false otherwise.
isCurrentTimestampSelectStringCallable
()

Overrides org.hibernate.dialect.Dialect.isCurrentTimestampSelectStringCallable.

Should the value returned by getCurrentTimestampSelectString be treated as callable.
public Boolean

Returns:

see the result matrix above.
performTemporaryTableDDLInIsolation
()

Overrides org.hibernate.dialect.Dialect.performTemporaryTableDDLInIsolation.

Different behavior for GLOBAL TEMPORARY (1.8) and LOCAL TEMPORARY (2.0)

Possible return values and their meanings:

public boolean

Returns:

True if select clause parameter must be cast()ed
requiresCastingOfParametersInSelectClause
()

Overrides org.hibernate.dialect.Dialect.requiresCastingOfParametersInSelectClause.

todo - needs usage clarification If the SELECT statement is always part of a UNION, then the type of parameter is resolved by v. 2.0, but not v. 1.8 (assuming the other SELECT in the UNION has a column reference in the same position and can be type-resolved).
public boolean
supportsColumnCheck()

Overrides org.hibernate.dialect.Dialect.supportsColumnCheck.

Does this dialect support column-level check constraints?
public boolean
public boolean

Returns:

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

Overrides org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

HSQLDB 1.8.x requires CALL CURRENT_TIMESTAMP but this should not be treated as a callable statement.
public boolean
supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?
public boolean
supportsIdentityColumns()

Overrides org.hibernate.dialect.Dialect.supportsIdentityColumns.

Does this dialect support identity column key generation?
public boolean
public boolean
supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Does this dialect support some form of limiting query results via a SQL clause?
public boolean
supportsLobValueChangePropogation()

Overrides org.hibernate.dialect.Dialect.supportsLobValueChangePropogation.

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

Overrides org.hibernate.dialect.Dialect.supportsLockTimeouts.

Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
public boolean
supportsPooledSequences()

Overrides org.hibernate.dialect.Dialect.supportsPooledSequences.

Does this dialect support "pooled" sequences.
public boolean
supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?
public boolean

Returns:

True if temp tables are supported; false otherwise.
supportsTemporaryTables
()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTables.

Does this dialect support temporary tables?
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support `count(distinct a,b)`?
public boolean
supportsUnionAll()

Overrides org.hibernate.dialect.Dialect.supportsUnionAll.

Does this dialect support UNION ALL, which is generally a faster variant of UNION?
public boolean
supportsUnique()

Overrides org.hibernate.dialect.Dialect.supportsUnique.

Does this dialect support the UNIQUE column syntax?
public String
toBooleanValueString(boolean
The boolean value
bool
)

Overrides org.hibernate.dialect.Dialect.toBooleanValueString.

The SQL literal value to which this database maps boolean values.
Inherited from org.hibernate.dialect.Dialect:
addTypeOverrideappendIdentitySelectToInsertappendLockHintapplyLocksToSqlareStringComparisonsCaseInsensitivebindLimitParametersInReverseOrderbuildSQLExceptionConvertercloseQuoteconvertToFirstRowValuecreateCaseFragmentcreateOuterJoinFragmentdropConstraintsforceLimitUsageforUpdateOfColumnsgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetCascadeConstraintsStringgetCastTypeNamegetColumnAliasExtractorgetColumnCommentgetCreateMultisetTableStringgetCreateSequenceStringgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCrossJoinSeparatorgetDefaultPropertiesgetDialectgetDialectgetDropForeignKeyStringgetDropSequenceStringsgetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIdentityColumnStringgetIdentitySelectStringgetKeywordsgetLimitStringgetLowercaseFunctiongetMaxAliasLengthgetNativeIdentifierGeneratorClassgetNoColumnsInsertStringgetNullColumnStringgetReadLockStringgetResultSetgetSelectGUIDStringgetTableCommentgetTableTypeStringgetTypeNamegetTypeNamegetTypeOverridesgetWriteLockStringhasAlterTablehasDataTypeInIdentityColumnhasSelfReferentialForeignKeyBugisLockTimeoutParameterizedopenQuotequalifyIndexNamequoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordregisterResultSetOutParameterreplaceResultVariableInOrderByClauseWithPositionsupportsBindAsCallableArgumentsupportsCascadeDeletesupportsCircularCascadeDeleteConstraintssupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsIfExistsBeforeTableNamesupportsInsertSelectIdentitysupportsLimitOffsetsupportsNotNullUniquesupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsRowValueConstructorSyntaxsupportsRowValueConstructorSyntaxInInListsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTupleCountssupportsUnboundedLobLocatorMaterializationsupportsUniqueConstraintInCreateAlterTablesupportsVariableLimittoStringtransformSelectStringuseInputStreamToInsertBlobuseMaxForLimit

Field Detail

EXTRACTER_18back to summary
private static ViolatedConstraintNameExtracter EXTRACTER_18
EXTRACTER_20back to summary
private static ViolatedConstraintNameExtracter EXTRACTER_20

HSQLDB 2.0 messages have changed messages may be localized - therefore use the common, non-locale element " table: "

hsqldbVersionback to summary
private int hsqldbVersion

version is 18 for 1.8 or 20 for 2.0

logback to summary
private static final Logger log

Hides org.hibernate.dialect.Dialect.log.

Constructor Detail

HSQLDialectback to summary
public HSQLDialect()

Method Detail

bindLimitParametersFirstback to summary
public boolean bindLimitParametersFirst()

Overrides org.hibernate.dialect.Dialect.bindLimitParametersFirst.

Doc from org.hibernate.dialect.Dialect.bindLimitParametersFirst.

Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?

Returns:boolean

true if limit parameters should come before other parameters

doesReadCommittedCauseWritersToBlockReadersback to summary
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?

Returns:boolean

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

doesRepeatableReadCauseReadersToBlockWritersback to summary
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?

Returns:boolean

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

dropTemporaryTableAfterUseback to summary
public boolean dropTemporaryTableAfterUse()

Overrides org.hibernate.dialect.Dialect.dropTemporaryTableAfterUse.

Do we need to drop the temporary table after use? todo - clarify usage by Hibernate Version 1.8 GLOBAL TEMPORARY table definitions persist beyond the end of the session (by default, data is cleared at commit).

Version 2.x LOCAL TEMPORARY table definitions do not persist beyond the end of the session (by default, data is cleared at commit).

Returns:boolean

True if the table should be dropped.

generateTemporaryTableNameback to summary
public String generateTemporaryTableName(String baseTableName)

Overrides org.hibernate.dialect.Dialect.generateTemporaryTableName.

With HSQLDB 2.0, the table name is qualified with MODULE to assist the drop statement (in-case there is a global name beginning with HT_)

Parameters
baseTableName:String

The table name from which to base the temp table name.

Returns:String

The generated temp table name.

getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

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

The syntax used to add a column to a table (optional).

Returns:String

The "add column" fragment.

getCreateSequenceStringback to summary
protected String getCreateSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

Doc from org.hibernate.dialect.Dialect.getCreateSequenceString.

Typically dialects which support sequences can create a sequence with a single command. This is convenience form of getCreateSequenceStrings to help facilitate that.

Dialects which support sequences and can create a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to create a sequence should instead override getCreateSequenceStrings.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence creation command

getCreateTemporaryTablePostfixback to summary
public String getCreateTemporaryTablePostfix()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

No fragment is needed if data is not needed beyond commit, otherwise should add "on commit preserve rows"

Returns:String

Any required postfix.

getCreateTemporaryTableStringback to summary
public String getCreateTemporaryTableString()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTableString.

Command used to create a temporary table.

Returns:String

The command used to create a temporary table.

getCurrentTimestampSelectStringback to summary
public String getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

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

Returns:String

The command.

getCurrentTimestampSQLFunctionNameback to summary
public String getCurrentTimestampSQLFunctionName()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSQLFunctionName.

The name of the database-specific SQL function for retrieving the current timestamp.

Returns:String

The function name.

getDropSequenceStringback to summary
protected String getDropSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

Doc from org.hibernate.dialect.Dialect.getDropSequenceString.

Typically dialects which support sequences can drop a sequence with a single command. This is convenience form of getDropSequenceStrings to help facilitate that.

Dialects which support sequences and can drop a sequence in a single command need *only* override this method. Dialects which support sequences but require multiple commands to drop a sequence should instead override getDropSequenceStrings.

Parameters
sequenceName:String

The name of the sequence

Returns:String

The sequence drop commands

getDropTemporaryTableStringback to summary
public String getDropTemporaryTableString()

Overrides org.hibernate.dialect.Dialect.getDropTemporaryTableString.

Command used to drop a temporary table.

Returns:String

The command used to drop a temporary table.

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 locks for this dialect.

Returns:String

The appropriate FOR UPDATE clause string.

getIdentityColumnStringback to summary
public String getIdentityColumnString()

Overrides org.hibernate.dialect.Dialect.getIdentityColumnString.

Doc from org.hibernate.dialect.Dialect.getIdentityColumnString.

The syntax used during DDL to define a column as being an IDENTITY.

Returns:String

The appropriate DDL fragment.

getIdentityInsertStringback to summary
public String getIdentityInsertString()

Overrides org.hibernate.dialect.Dialect.getIdentityInsertString.

Doc from org.hibernate.dialect.Dialect.getIdentityInsertString.

The keyword used to insert a generated value into an identity column (or null). Need if the dialect does not support inserts that specify no column values.

Returns:String

The appropriate keyword.

getIdentitySelectStringback to summary
public String getIdentitySelectString()

Overrides org.hibernate.dialect.Dialect.getIdentitySelectString.

Doc from org.hibernate.dialect.Dialect.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value.

Returns:String

The appropriate select command

getLimitStringback to summary
public String getLimitString(String sql, boolean hasOffset)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Doc from org.hibernate.dialect.Dialect.getLimitString.

Apply s limit clause to the query.

Typically dialects utilize variable limit clauses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offest since we will just be using placeholders.

Here we do still pass along whether or not an offset was specified so that dialects not supporting offsets can generate proper exceptions. In general, dialects will override one or the other of this method and getLimitString(String, int, int).

Parameters
sql:String

The query to which to apply the limit.

hasOffset:boolean

Is the query requesting an offset?

Returns:String

the modified SQL

getLockingStrategyback to summary
public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode)

Overrides org.hibernate.dialect.Dialect.getLockingStrategy.

For HSQLDB 2.0, this is a copy of the base class implementation. For HSQLDB 1.8, only READ_UNCOMMITTED is supported.

Parameters
lockable:Lockable

The persister for the entity to be locked.

lockMode:LockMode

The type of lock to be acquired.

Returns:LockingStrategy

The appropriate locking strategy.

Since
3.2
getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

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

Returns:String

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

getSelectClauseNullStringback to summary
public String getSelectClauseNullString(int sqlType)

Overrides org.hibernate.dialect.Dialect.getSelectClauseNullString.

Doc from org.hibernate.dialect.Dialect.getSelectClauseNullString.

Given a java.sql.Types type code, determine an appropriate null value to use in a select clause.

One thing to consider here is that certain databases might require proper casting for the nulls here since the select here will be part of a UNION/UNION ALL.

Parameters
sqlType:int

The java.sql.Types type code.

Returns:String

The appropriate select clause value fragment.

getSelectSequenceNextValStringback to summary
public String getSelectSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Doc from org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.

This differs from getSequenceNextValString(String) in that this should return an expression usable within another statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

The "nextval" fragment.

getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

Doc from org.hibernate.dialect.Dialect.getSequenceNextValString.

Generate the appropriate select statement to to retrieve the next value of a sequence.

This should be a "stand alone" select statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String The "nextval" select string.

getViolatedConstraintNameExtracterback to summary
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()

Overrides org.hibernate.dialect.Dialect.getViolatedConstraintNameExtracter.

isCurrentTimestampSelectStringCallableback to summary
public boolean isCurrentTimestampSelectStringCallable()

Overrides org.hibernate.dialect.Dialect.isCurrentTimestampSelectStringCallable.

Should the value returned by getCurrentTimestampSelectString be treated as callable. Typically this indicates that JDBC escape syntax is being used...

CALL CURRENT_TIMESTAMP is used but this should not be treated as a callable statement.

Returns:boolean

True if the getCurrentTimestampSelectString return is callable; false otherwise.

performTemporaryTableDDLInIsolationback to summary
public Boolean performTemporaryTableDDLInIsolation()

Overrides org.hibernate.dialect.Dialect.performTemporaryTableDDLInIsolation.

Different behavior for GLOBAL TEMPORARY (1.8) and LOCAL TEMPORARY (2.0)

Possible return values and their meanings:

Returns:Boolean

see the result matrix above.

requiresCastingOfParametersInSelectClauseback to summary
public boolean requiresCastingOfParametersInSelectClause()

Overrides org.hibernate.dialect.Dialect.requiresCastingOfParametersInSelectClause.

todo - needs usage clarification If the SELECT statement is always part of a UNION, then the type of parameter is resolved by v. 2.0, but not v. 1.8 (assuming the other SELECT in the UNION has a column reference in the same position and can be type-resolved). On the other hand if the SELECT statement is isolated, all versions of HSQLDB require casting for "select ? from .." to work.

Returns:boolean

True if select clause parameter must be cast()ed

Since
3.2
supportsColumnCheckback to summary
public boolean supportsColumnCheck()

Overrides org.hibernate.dialect.Dialect.supportsColumnCheck.

Doc from org.hibernate.dialect.Dialect.supportsColumnCheck.

Does this dialect support column-level check constraints?

Returns:boolean

True if column-level CHECK constraints are supported; false otherwise.

supportsCommentOnback to summary
public boolean supportsCommentOn()

Overrides org.hibernate.dialect.Dialect.supportsCommentOn.

supportsCurrentTimestampSelectionback to summary
public boolean supportsCurrentTimestampSelection()

Overrides org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

HSQLDB 1.8.x requires CALL CURRENT_TIMESTAMP but this should not be treated as a callable statement. It is equivalent to "select current_timestamp from dual" in some databases. HSQLDB 2.0 also supports VALUES CURRENT_TIMESTAMP

Returns:boolean

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

supportsEmptyInListback to summary
public boolean supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Doc from org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?

For example, is [where XYZ in ()] a supported construct?

Returns:boolean

True if empty in lists are supported; false otherwise.

Annotations
@Override
supportsIdentityColumnsback to summary
public boolean supportsIdentityColumns()

Overrides org.hibernate.dialect.Dialect.supportsIdentityColumns.

Doc from org.hibernate.dialect.Dialect.supportsIdentityColumns.

Does this dialect support identity column key generation?

Returns:boolean

True if IDENTITY columns are supported; false otherwise.

supportsIfExistsAfterTableNameback to summary
public boolean supportsIfExistsAfterTableName()

Overrides org.hibernate.dialect.Dialect.supportsIfExistsAfterTableName.

supportsLimitback to summary
public boolean supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Doc from org.hibernate.dialect.Dialect.supportsLimit.

Does this dialect support some form of limiting query results via a SQL clause?

Returns:boolean

True if this dialect supports some form of LIMIT.

supportsLobValueChangePropogationback to summary
public boolean supportsLobValueChangePropogation()

Overrides org.hibernate.dialect.Dialect.supportsLobValueChangePropogation.

Doc from org.hibernate.dialect.Dialect.supportsLobValueChangePropogation.

Does the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance...

For BLOBs, the internal value might be changed by: java.sql.Blob#setBinaryStream, java.sql.Blob#setBytes(long, byte[]), java.sql.Blob#setBytes(long, byte[], int, int), or java.sql.Blob#truncate(long).

For CLOBs, the internal value might be changed by: java.sql.Clob#setAsciiStream(long), java.sql.Clob#setCharacterStream(long), java.sql.Clob#setString(long, String), java.sql.Clob#setString(long, String, int, int), or java.sql.Clob#truncate(long).

NOTE : I do not know the correct answer currently for databases which (1) are not part of the cruise control process or (2) do not supportsExpectedLobUsagePattern.

Returns:boolean

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

supportsLockTimeoutsback to summary
public boolean supportsLockTimeouts()

Overrides org.hibernate.dialect.Dialect.supportsLockTimeouts.

Doc from org.hibernate.dialect.Dialect.supportsLockTimeouts.

Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.

Returns:boolean

True is this dialect supports specifying lock timeouts.

supportsPooledSequencesback to summary
public boolean supportsPooledSequences()

Overrides org.hibernate.dialect.Dialect.supportsPooledSequences.

Doc from org.hibernate.dialect.Dialect.supportsPooledSequences.

Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?

Returns:boolean

True if such "pooled" sequences are supported; false otherwise.

supportsSequencesback to summary
public boolean supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Doc from org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?

Returns:boolean

True if sequences supported; false otherwise.

supportsTemporaryTablesback to summary
public boolean supportsTemporaryTables()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTables.

Does this dialect support temporary tables?

Returns:boolean

True if temp tables are supported; false otherwise.

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 disintct tuples; false otherwise.

supportsUnionAllback to summary
public boolean supportsUnionAll()

Overrides org.hibernate.dialect.Dialect.supportsUnionAll.

Doc from org.hibernate.dialect.Dialect.supportsUnionAll.

Does this dialect support UNION ALL, which is generally a faster variant of UNION?

Returns:boolean

True if UNION ALL is supported; false otherwise.

supportsUniqueback to summary
public boolean supportsUnique()

Overrides org.hibernate.dialect.Dialect.supportsUnique.

Doc from org.hibernate.dialect.Dialect.supportsUnique.

Does this dialect support the UNIQUE column syntax?

Returns:boolean

boolean

toBooleanValueStringback to summary
public String toBooleanValueString(boolean bool)

Overrides org.hibernate.dialect.Dialect.toBooleanValueString.

Doc from org.hibernate.dialect.Dialect.toBooleanValueString.

The SQL literal value to which this database maps boolean values.

Parameters
bool:boolean

The boolean value

Returns:String

The appropriate SQL literal.

org.hibernate.dialect back to summary

public Class HSQLDialect.ReadUncommittedLockingStrategy

extends SelectLockingStrategy
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
lock(Serializable
The id of the row to be locked
id
,
Object
The current version (or null if not versioned)
version
,
Object
The object logically being locked (currently not used)
object
,
int
timeout in milliseconds, 0 = no wait, -1 = wait indefinitely
timeout
,
SessionImplementor
The session from which the lock request originated
session
)

Overrides org.hibernate.dialect.lock.SelectLockingStrategy.lock.

Implements org.hibernate.dialect.lock.LockingStrategy.lock.

Acquire an appropriate type of lock on the underlying data that will endure until the end of the current transaction.
Inherited from org.hibernate.dialect.lock.SelectLockingStrategy:
generateLockString

Constructor Detail

ReadUncommittedLockingStrategyback to summary
public ReadUncommittedLockingStrategy(Lockable lockable, LockMode lockMode)

Method Detail

lockback to summary
public void lock(Serializable id, Object version, Object object, int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException

Overrides org.hibernate.dialect.lock.SelectLockingStrategy.lock.

Implements org.hibernate.dialect.lock.LockingStrategy.lock.

Doc from org.hibernate.dialect.lock.LockingStrategy.lock.

Acquire an appropriate type of lock on the underlying data that will endure until the end of the current transaction.

Parameters
id:Serializable

The id of the row to be locked

version:Object

The current version (or null if not versioned)

object:Object

The object logically being locked (currently not used)

timeout:int

timeout in milliseconds, 0 = no wait, -1 = wait indefinitely

session:SessionImplementor

The session from which the lock request originated

Exceptions
StaleObjectStateException:
Indicates an optimistic lock failure as part of acquiring the requested database lock.
JDBCException:
Indicates errors from the JDBC driver.