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.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field 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 |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | bindLimitParametersFirst()
Overrides org. |
| public boolean | Returns: True if writers block readers to achieve READ_COMMITTED; false otherwise.Overrides org. |
| public boolean | Returns: True if readers block writers to achieve REPEATABLE_READ; false otherwise.Overrides org. |
| public boolean | Returns: True if the table should be dropped.Overrides org. |
| public String | Returns: The generated temp table name.The table name from which to base the temp table name. baseTableName)Overrides org. |
| public String | getAddColumnString()
The syntax used to add a column to a table (optional).
|
| protected String | getCreateSequenceString(String
The name of the sequence sequenceName)Overrides org. |
| public String | Returns: Any required postfix.Overrides org. |
| public String | Returns: The command used to create a temporary table.Overrides org. |
| public String | Returns: The command.Overrides org. |
| public String | Returns: The function name.Overrides org. |
| protected String | getDropSequenceString(String
The name of the sequence sequenceName)Overrides org. |
| public String | Returns: The command used to drop a temporary table.Overrides org. |
| public String | getForUpdateString()
Get the string to append to SELECT statements to acquire locks
for this dialect.
|
| public String | getIdentityColumnString()
Overrides org. |
| public String | getIdentityInsertString()
Overrides org. |
| public String | getIdentitySelectString()
Overrides org. |
| public String | getLimitString(String
The query to which to apply the limit. sql, boolean Is the query requesting an offset? hasOffset)Overrides org. |
| public LockingStrategy | Returns: The appropriate locking strategy.The persister for the entity to be locked. lockable, LockMode The type of lock to be acquired. lockMode)
For HSQLDB 2.0, this is a copy of the base class implementation.
|
| public String | getQuerySequencesString()
Overrides org. |
| public String | getSelectClauseNullString(int
The sqlType)java. type code.Overrides org. java. 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. |
| public String | getSequenceNextValString(String
the name of the sequence sequenceName)Overrides org. |
| public ViolatedConstraintNameExtracter | |
| public boolean | Returns: True if thegetCurrentTimestampSelectString return
is callable; false otherwise.Overrides org. getCurrentTimestampSelectString
be treated as callable.
|
| public Boolean | Returns: see the result matrix above.Overrides org. Possible return values and their meanings:
|
| public boolean | Returns: True if select clause parameter must be cast()edOverrides org. |
| public boolean | supportsColumnCheck()
Overrides org. |
| public boolean | |
| public boolean | Returns: True if the current timestamp can be retrieved; false otherwise.Overrides org. |
| public boolean | supportsEmptyInList()
Overrides org. |
| public boolean | supportsIdentityColumns()
Overrides org. |
| public boolean | |
| public boolean | supportsLimit()
Overrides org. |
| public boolean | supportsLobValueChangePropogation()
Overrides org. |
| public boolean | supportsLockTimeouts()
Overrides org. |
| public boolean | supportsPooledSequences()
Overrides org. |
| public boolean | supportsSequences()
Does this dialect support sequences?
|
| public boolean | Returns: True if temp tables are supported; false otherwise.Overrides org. |
| public boolean | supportsTupleDistinctCounts()
Overrides org. |
| public boolean | supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
|
| public boolean | supportsUnique()
Overrides org. |
| public String | toBooleanValueString(boolean
The boolean value bool)Overrides org. |
| EXTRACTER_18 | back to summary |
|---|---|
| private static ViolatedConstraintNameExtracter EXTRACTER_18 | |
| EXTRACTER_20 | back 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: " | |
| hsqldbVersion | back to summary |
|---|---|
| private int hsqldbVersion version is 18 for 1.8 or 20 for 2.0 | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| HSQLDialect | back to summary |
|---|---|
| public HSQLDialect() | |
| bindLimitParametersFirst | back to summary |
|---|---|
| public boolean bindLimitParametersFirst() Overrides org. Doc from org. Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
| |
| doesReadCommittedCauseWritersToBlockReaders | back to summary |
|---|---|
| public boolean doesReadCommittedCauseWritersToBlockReaders() Overrides org. For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
| |
| doesRepeatableReadCauseReadersToBlockWriters | back to summary |
|---|---|
| public boolean doesRepeatableReadCauseReadersToBlockWriters() Overrides org. For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
| |
| dropTemporaryTableAfterUse | back to summary |
|---|---|
| public boolean dropTemporaryTableAfterUse() Overrides org. 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).
| |
| generateTemporaryTableName | back to summary |
|---|---|
| public String generateTemporaryTableName(String baseTableName) Overrides org. 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_) | |
| getAddColumnString | back to summary |
|---|---|
| public String getAddColumnString() Overrides org. Doc from org. The syntax used to add a column to a table (optional).
| |
| getCreateSequenceString | back to summary |
|---|---|
| protected String getCreateSequenceString(String sequenceName) Overrides org. Doc from org. Typically dialects which support sequences can create a sequence
with a single command. This is convenience form of
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 | |
| getCreateTemporaryTablePostfix | back to summary |
|---|---|
| public String getCreateTemporaryTablePostfix() Overrides org. No fragment is needed if data is not needed beyond commit, otherwise should add "on commit preserve rows"
| |
| getCreateTemporaryTableString | back to summary |
|---|---|
| public String getCreateTemporaryTableString() Overrides org. Command used to create a temporary table.
| |
| getCurrentTimestampSelectString | back to summary |
|---|---|
| public String getCurrentTimestampSelectString() Overrides org. Retrieve the command used to retrieve the current timestamp from the database.
| |
| getCurrentTimestampSQLFunctionName | back to summary |
|---|---|
| public String getCurrentTimestampSQLFunctionName() Overrides org. The name of the database-specific SQL function for retrieving the current timestamp.
| |
| getDropSequenceString | back to summary |
|---|---|
| protected String getDropSequenceString(String sequenceName) Overrides org. Doc from org. Typically dialects which support sequences can drop a sequence
with a single command. This is convenience form of
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 | |
| getDropTemporaryTableString | back to summary |
|---|---|
| public String getDropTemporaryTableString() Overrides org. Command used to drop a temporary table.
| |
| getForUpdateString | back to summary |
|---|---|
| public String getForUpdateString() Overrides org. Doc from org. Get the string to append to SELECT statements to acquire locks for this dialect.
| |
| getIdentityColumnString | back to summary |
|---|---|
| public String getIdentityColumnString() Overrides org. Doc from org. The syntax used during DDL to define a column as being an IDENTITY.
| |
| getIdentityInsertString | back to summary |
|---|---|
| public String getIdentityInsertString() Overrides org. Doc from org. 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.
| |
| getIdentitySelectString | back to summary |
|---|---|
| public String getIdentitySelectString() Overrides org. Doc from org. Get the select command to use to retrieve the last generated IDENTITY value.
| |
| getLimitString | back to summary |
|---|---|
| public String getLimitString(String sql, boolean hasOffset) Overrides org. Doc from org. Apply s limit clause to the query.
Typically dialects utilize
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
| |
| getLockingStrategy | back to summary |
|---|---|
| public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode) Overrides org. For HSQLDB 2.0, this is a copy of the base class implementation. For HSQLDB 1.8, only READ_UNCOMMITTED is supported.
| |
| getQuerySequencesString | back to summary |
|---|---|
| public String getQuerySequencesString() Overrides org. Doc from org. Get the select command used retrieve the names of all sequences.
| |
| getSelectClauseNullString | back to summary |
|---|---|
| public String getSelectClauseNullString(int sqlType) Overrides org. Doc from org. Given a 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.
| |
| getSelectSequenceNextValString | back to summary |
|---|---|
| public String getSelectSequenceNextValString(String sequenceName) Overrides org. Doc from org. 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 | back to summary |
|---|---|
| public String getSequenceNextValString(String sequenceName) Overrides org. Doc from org. Generate the appropriate select statement to to retrieve the next value of a sequence. This should be a "stand alone" select statement. | |
| getViolatedConstraintNameExtracter | back to summary |
|---|---|
| public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter() Overrides org. | |
| isCurrentTimestampSelectStringCallable | back to summary |
|---|---|
| public boolean isCurrentTimestampSelectStringCallable() Overrides org. Should the value returned by CALL CURRENT_TIMESTAMP is used but this should not be treated as a callable statement.
| |
| performTemporaryTableDDLInIsolation | back to summary |
|---|---|
| public Boolean performTemporaryTableDDLInIsolation() Overrides org. Different behavior for GLOBAL TEMPORARY (1.8) and LOCAL TEMPORARY (2.0) Possible return values and their meanings:
| |
| requiresCastingOfParametersInSelectClause | back to summary |
|---|---|
| public boolean requiresCastingOfParametersInSelectClause() Overrides org. 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.
| |
| supportsColumnCheck | back to summary |
|---|---|
| public boolean supportsColumnCheck() Overrides org. Doc from org. Does this dialect support column-level check constraints?
| |
| supportsCommentOn | back to summary |
|---|---|
| public boolean supportsCommentOn() | |
| supportsCurrentTimestampSelection | back to summary |
|---|---|
| public boolean supportsCurrentTimestampSelection() Overrides org. 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
| |
| supportsEmptyInList | back to summary |
|---|---|
| public boolean supportsEmptyInList() Overrides org. Doc from org. Does this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct?
| |
| supportsIdentityColumns | back to summary |
|---|---|
| public boolean supportsIdentityColumns() Overrides org. Doc from org. Does this dialect support identity column key generation?
| |
| supportsIfExistsAfterTableName | back to summary |
|---|---|
| public boolean supportsIfExistsAfterTableName() Overrides org. | |
| supportsLimit | back to summary |
|---|---|
| public boolean supportsLimit() Overrides org. Doc from org. Does this dialect support some form of limiting query results via a SQL clause?
| |
| supportsLobValueChangePropogation | back to summary |
|---|---|
| public boolean supportsLobValueChangePropogation() Overrides org. Doc from org. 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:
For CLOBs, the internal value might be changed by:
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
| |
| supportsLockTimeouts | back to summary |
|---|---|
| public boolean supportsLockTimeouts() Overrides org. Doc from org. Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
| |
| supportsPooledSequences | back to summary |
|---|---|
| public boolean supportsPooledSequences() Overrides org. Doc from org. Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?
| |
| supportsSequences | back to summary |
|---|---|
| public boolean supportsSequences() Overrides org. Doc from org. Does this dialect support sequences?
| |
| supportsTemporaryTables | back to summary |
|---|---|
| public boolean supportsTemporaryTables() Overrides org. Does this dialect support temporary tables?
| |
| supportsTupleDistinctCounts | back to summary |
|---|---|
| public boolean supportsTupleDistinctCounts() Overrides org. Doc from org. Does this dialect support `count(distinct a,b)`?
| |
| supportsUnionAll | back to summary |
|---|---|
| public boolean supportsUnionAll() Overrides org. Doc from org. Does this dialect support UNION ALL, which is generally a faster variant of UNION?
| |
| supportsUnique | back to summary |
|---|---|
| public boolean supportsUnique() Overrides org. Doc from org. Does this dialect support the UNIQUE column syntax?
| |
| toBooleanValueString | back to summary |
|---|---|
| public String toBooleanValueString(boolean bool) Overrides org. Doc from org. The SQL literal value to which this database maps boolean values.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method 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. Implements org. |
| ReadUncommittedLockingStrategy | back to summary |
|---|---|
| public ReadUncommittedLockingStrategy(Lockable lockable, LockMode lockMode) | |
| lock | back to summary |
|---|---|
| public void lock(Serializable id, Object version, Object object, int timeout, SessionImplementor session) throws StaleObjectStateException, JDBCException Overrides org. Implements org. Doc from org. Acquire an appropriate type of lock on the underlying data that will endure until the end of the current transaction.
| |