org.hibernate.dialect
Class HSQLDialect

java.lang.Object
  extended byorg.hibernate.dialect.Dialect
      extended byorg.hibernate.dialect.HSQLDialect

public class HSQLDialect
extends Dialect

An SQL dialect compatible with HSQLDB (Hypersonic SQL).

Author:
Christoph Sturm, Phillip Baird

Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
HSQLDialect()
           
 
Method Summary
 boolean bindLimitParametersFirst()
          Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
 SQLExceptionConverter buildSQLExceptionConverter()
          Build an instance of the SQLExceptionConverter preferred by this dialect for converting SQLExceptions into Hibernate's JDBCException hierarchy.
 String getAddColumnString()
          The syntax used to add a column to a table (optional).
 String[] getCreateSequenceStrings(String sequenceName)
          The multiline script used to create a sequence, if sequences are supported.
 String[] getDropSequenceStrings(String sequenceName)
          The multiline script used to drop a sequence, if sequences are supported.
 String getForUpdateString()
          Does this dialect support the FOR UPDATE syntax?
 String getIdentityColumnString()
           
 String getIdentityInsertString()
          The keyword used to insert a generated value into an identity column (or null)
 String getIdentitySelectString()
           
 String getLimitString(String sql, boolean hasOffset)
          Add a LIMIT clause to the given SQL SELECT
 String getQuerySequencesString()
          A query used to find all sequences
 String getSequenceNextValString(String sequenceName)
          The syntax that fetches the next value of a sequence, if sequences are supported.
 ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
           
 boolean supportsColumnCheck()
          Does this dialect support column-level check constraints?
 boolean supportsIdentityColumns()
          Does this dialect support identity column key generation?
 boolean supportsIfExistsAfterTableName()
           
 boolean supportsLimit()
          Does this Dialect have some kind of LIMIT syntax?
 boolean supportsSequences()
          Does this dialect support sequences?
 boolean supportsUnique()
          Not supported in 1.7.1 (1.7.2 only)
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, bindLimitParametersInReverseOrder, closeQuote, createCaseFragment, createOuterJoinFragment, dropConstraints, forUpdateOfColumns, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getColumnComment, getCreateSequenceString, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getFunctions, getIdentityColumnString, getIdentitySelectString, getLimitString, getLowercaseFunction, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getResultSet, getSchemaSeparator, getSelectClauseNullString, getSelectGUIDString, getTableComment, getTableTypeString, getTypeName, getTypeName, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, openQuote, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerResultSetOutParameter, supportsCascadeDelete, supportsCommentOn, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimitOffset, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsTableCheck, supportsUnionAll, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toString, useInputStreamToInsertBlob, useMaxForLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HSQLDialect

public HSQLDialect()
Method Detail

getAddColumnString

public String getAddColumnString()
Description copied from class: Dialect
The syntax used to add a column to a table (optional).

Overrides:
getAddColumnString in class Dialect

supportsIdentityColumns

public boolean supportsIdentityColumns()
Description copied from class: Dialect
Does this dialect support identity column key generation?

Overrides:
supportsIdentityColumns in class Dialect
Returns:
boolean

getIdentityColumnString

public String getIdentityColumnString()
Overrides:
getIdentityColumnString in class Dialect

getIdentitySelectString

public String getIdentitySelectString()
Overrides:
getIdentitySelectString in class Dialect

getIdentityInsertString

public String getIdentityInsertString()
Description copied from class: Dialect
The keyword used to insert a generated value into an identity column (or null)

Overrides:
getIdentityInsertString in class Dialect
Returns:
String

getForUpdateString

public String getForUpdateString()
Description copied from class: Dialect
Does this dialect support the FOR UPDATE syntax?

Overrides:
getForUpdateString in class Dialect
Returns:
boolean

supportsUnique

public boolean supportsUnique()
Not supported in 1.7.1 (1.7.2 only)

Overrides:
supportsUnique in class Dialect
Returns:
boolean

supportsLimit

public boolean supportsLimit()
Description copied from class: Dialect
Does this Dialect have some kind of LIMIT syntax?

Overrides:
supportsLimit in class Dialect

getLimitString

public String getLimitString(String sql,
                             boolean hasOffset)
Description copied from class: Dialect
Add a LIMIT clause to the given SQL SELECT

Overrides:
getLimitString in class Dialect
Returns:
the modified SQL

bindLimitParametersFirst

public boolean bindLimitParametersFirst()
Description copied from class: Dialect
Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?

Overrides:
bindLimitParametersFirst in class Dialect
Returns:
true if limit parameters should come before other parameters

supportsIfExistsAfterTableName

public boolean supportsIfExistsAfterTableName()
Overrides:
supportsIfExistsAfterTableName in class Dialect

supportsColumnCheck

public boolean supportsColumnCheck()
Description copied from class: Dialect
Does this dialect support column-level check constraints?

Overrides:
supportsColumnCheck in class Dialect

getCreateSequenceStrings

public String[] getCreateSequenceStrings(String sequenceName)
Description copied from class: Dialect
The multiline script used to create a sequence, if sequences are supported.

Overrides:
getCreateSequenceStrings in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String[]

getDropSequenceStrings

public String[] getDropSequenceStrings(String sequenceName)
Description copied from class: Dialect
The multiline script used to drop a sequence, if sequences are supported.

Overrides:
getDropSequenceStrings in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String[]

getSequenceNextValString

public String getSequenceNextValString(String sequenceName)
Description copied from class: Dialect
The syntax that fetches the next value of a sequence, if sequences are supported.

Overrides:
getSequenceNextValString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

supportsSequences

public boolean supportsSequences()
Description copied from class: Dialect
Does this dialect support sequences?

Overrides:
supportsSequences in class Dialect
Returns:
boolean

getQuerySequencesString

public String getQuerySequencesString()
Description copied from class: Dialect
A query used to find all sequences

Overrides:
getQuerySequencesString in class Dialect
See Also:
SchemaUpdate

buildSQLExceptionConverter

public SQLExceptionConverter buildSQLExceptionConverter()
Build an instance of the SQLExceptionConverter preferred by this dialect for converting SQLExceptions into Hibernate's JDBCException hierarchy. The default Dialect implementation simply returns a converter based on X/Open SQLState codes.

It is strongly recommended that specific Dialect implementations override this method, since interpretation of a SQL error is much more accurate when based on the ErrorCode rather than the SQLState. Unfortunately, the ErrorCode is a vendor- specific approach.

Overrides:
buildSQLExceptionConverter in class Dialect
Returns:
The Dialect's preferred SQLExceptionConverter.

getViolatedConstraintNameExtracter

public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
Overrides:
getViolatedConstraintNameExtracter in class Dialect