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

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

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?
 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 getSelectSequenceNextValString(String sequenceName)
          Generate the select expression fragment that will retreive the next value of a sequence, if sequences are supported.
 String getSequenceNextValString(String sequenceName)
          Generate the appropriate select statement to to retreive the next value of a sequence, if sequences are supported.
 ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
           
 boolean supportsColumnCheck()
          Does this dialect support column-level check constraints?
 boolean supportsCurrentTimestampSelection()
           
 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 supportsTemporaryTables()
          HSQL does not really support temp tables; just take advantage of the fact that it is a single user db...
 boolean supportsUnique()
          Does this dialect support the UNIQUE column syntax?
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createCaseFragment, createOuterJoinFragment, dropConstraints, dropTemporaryTableAfterUse, forUpdateOfColumns, generateTemporaryTableName, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateSequenceString, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentitySelectString, getKeywords, getLimitString, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getTableComment, getTableTypeString, getTypeName, getTypeName, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsCascadeDelete, supportsCommentOn, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimitOffset, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsTableCheck, supportsUnionAll, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, 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). Need if the dialect does not support inserts that specify no column values.

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()
Description copied from class: Dialect
Does this dialect support the UNIQUE column syntax?

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[]

getSelectSequenceNextValString

public String getSelectSequenceNextValString(String sequenceName)
Description copied from class: Dialect
Generate the select expression fragment that will retreive the next value of a sequence, if sequences are supported.

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

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

getSequenceNextValString

public String getSequenceNextValString(String sequenceName)
Description copied from class: Dialect
Generate the appropriate select statement to to retreive the next value of a sequence, if sequences are supported.

This should be a "stand alone" select statement.

Overrides:
getSequenceNextValString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String The "nextval" select string.

getQuerySequencesString

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

Overrides:
getQuerySequencesString in class Dialect
See Also:
SchemaUpdate

supportsSequences

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

Overrides:
supportsSequences in class Dialect
Returns:
boolean

getViolatedConstraintNameExtracter

public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
Overrides:
getViolatedConstraintNameExtracter in class Dialect

supportsTemporaryTables

public boolean supportsTemporaryTables()
HSQL does not really support temp tables; just take advantage of the fact that it is a single user db...

Overrides:
supportsTemporaryTables in class Dialect

supportsCurrentTimestampSelection

public boolean supportsCurrentTimestampSelection()
Overrides:
supportsCurrentTimestampSelection in class Dialect