|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.dialect.Dialect org.hibernate.dialect.HSQLDialect
public class HSQLDialect
An SQL dialect compatible with HSQLDB (Hypersonic SQL).
Note this version supports HSQLDB version 1.8 and higher, only.
Nested Class Summary | |
---|---|
static class |
HSQLDialect.ReadUncommittedLockingStrategy
|
Field Summary |
---|
Fields inherited from class org.hibernate.dialect.Dialect |
---|
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, 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). |
protected String |
getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence with a single command. |
protected String |
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence with a single command. |
String |
getForUpdateString()
Get the string to append to SELECT statements to acquire locks for this dialect. |
String |
getIdentityColumnString()
The syntax used during DDL to define a column as being an IDENTITY. |
String |
getIdentityInsertString()
The keyword used to insert a generated value into an identity column (or null). |
String |
getIdentitySelectString()
Get the select command to use to retrieve the last generated IDENTITY value. |
String |
getLimitString(String sql,
boolean hasOffset)
Apply s limit clause to the query. |
LockingStrategy |
getLockingStrategy(Lockable lockable,
LockMode lockMode)
Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect. |
String |
getQuerySequencesString()
Get the select command used retrieve the names of all sequences. |
String |
getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retreive the next value of a sequence as part of another (typically DML) statement. |
String |
getSequenceNextValString(String sequenceName)
Generate the appropriate select statement to to retreive the next value of a sequence. |
ViolatedConstraintNameExtracter |
getViolatedConstraintNameExtracter()
|
boolean |
supportsColumnCheck()
Does this dialect support column-level check constraints? |
boolean |
supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database's current timestamp value? |
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct? |
boolean |
supportsIdentityColumns()
Does this dialect support identity column key generation? |
boolean |
supportsIfExistsAfterTableName()
|
boolean |
supportsLimit()
Does this dialect support some form of limiting query results via a SQL clause? |
boolean |
supportsLobValueChangePropogation()
Does the dialect support propogating 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... |
boolean |
supportsPooledSequences()
Does this dialect support "pooled" sequences. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HSQLDialect()
Method Detail |
---|
public String getAddColumnString()
Dialect
getAddColumnString
in class Dialect
public boolean supportsIdentityColumns()
Dialect
supportsIdentityColumns
in class Dialect
public String getIdentityColumnString()
Dialect
getIdentityColumnString
in class Dialect
public String getIdentitySelectString()
Dialect
getIdentitySelectString
in class Dialect
public String getIdentityInsertString()
Dialect
getIdentityInsertString
in class Dialect
public String getForUpdateString()
Dialect
getForUpdateString
in class Dialect
public boolean supportsUnique()
Dialect
supportsUnique
in class Dialect
public boolean supportsLimit()
Dialect
supportsLimit
in class Dialect
public String getLimitString(String sql, boolean hasOffset)
Dialect
variable
limit caluses 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
Dialect.getLimitString(String, int, int)
.
getLimitString
in class Dialect
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?
public boolean bindLimitParametersFirst()
Dialect
bindLimitParametersFirst
in class Dialect
public boolean supportsIfExistsAfterTableName()
supportsIfExistsAfterTableName
in class Dialect
public boolean supportsColumnCheck()
Dialect
supportsColumnCheck
in class Dialect
public boolean supportsSequences()
Dialect
supportsSequences
in class Dialect
public boolean supportsPooledSequences()
Dialect
supportsPooledSequences
in class Dialect
Dialect.getCreateSequenceStrings(String, int, int)
,
Dialect.getCreateSequenceString(String, int, int)
protected String getCreateSequenceString(String sequenceName)
Dialect
Dialect.getCreateSequenceStrings(java.lang.String)
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 Dialect.getCreateSequenceStrings(java.lang.String)
.
getCreateSequenceString
in class Dialect
sequenceName
- The name of the sequence
protected String getDropSequenceString(String sequenceName)
Dialect
Dialect.getDropSequenceStrings(java.lang.String)
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 Dialect.getDropSequenceStrings(java.lang.String)
.
getDropSequenceString
in class Dialect
sequenceName
- The name of the sequence
public String getSelectSequenceNextValString(String sequenceName)
Dialect
Dialect.getSequenceNextValString(String)
in that this
should return an expression usable within another statement.
getSelectSequenceNextValString
in class Dialect
sequenceName
- the name of the sequence
public String getSequenceNextValString(String sequenceName)
Dialect
getSequenceNextValString
in class Dialect
sequenceName
- the name of the sequence
public String getQuerySequencesString()
Dialect
getQuerySequencesString
in class Dialect
SchemaUpdate
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter
in class Dialect
public boolean supportsTemporaryTables()
supportsTemporaryTables
in class Dialect
public boolean supportsCurrentTimestampSelection()
Dialect
supportsCurrentTimestampSelection
in class Dialect
public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode)
Dialect
getLockingStrategy
in class Dialect
lockable
- The persister for the entity to be locked.lockMode
- The type of lock to be acquired.
public boolean supportsEmptyInList()
Dialect
supportsEmptyInList
in class Dialect
public boolean supportsLobValueChangePropogation()
Dialect
Blob.setBinaryStream(long)
,
Blob.setBytes(long, byte[])
,
Blob.setBytes(long, byte[], int, int)
,
or Blob.truncate(long)
.
For CLOBs, the internal value might be changed by:
Clob.setAsciiStream(long)
,
Clob.setCharacterStream(long)
,
Clob.setString(long, String)
,
Clob.setString(long, String, int, int)
,
or 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 Dialect.supportsExpectedLobUsagePattern()
.
supportsLobValueChangePropogation
in class Dialect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |