|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.dialect.Dialect
org.hibernate.dialect.H2Dialect
public class H2Dialect
A dialect compatible with the H2 database.
| Field Summary |
|---|
| Fields inherited from class org.hibernate.dialect.Dialect |
|---|
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE |
| Constructor Summary | |
|---|---|
H2Dialect()
|
|
| Method Summary | |
|---|---|
boolean |
bindLimitParametersFirst()
Does the LIMIT clause come at the start of the SELECT statement, rather than at the end? |
boolean |
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. |
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. |
String |
getCreateTemporaryTableString()
Command used to create a temporary table. |
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestammp from the database. |
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. |
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 |
isCurrentTimestampSelectStringCallable()
Should the value returned by Dialect.getCurrentTimestampSelectString()
be treated as callable. |
boolean |
supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database's current timestamp value? |
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()
Does this dialect support temporary tables? |
boolean |
supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster variant of UNION? |
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 H2Dialect()
| Method Detail |
|---|
public String getAddColumnString()
Dialect
getAddColumnString in class Dialectpublic boolean supportsIdentityColumns()
Dialect
supportsIdentityColumns in class Dialectpublic String getIdentityColumnString()
Dialect
getIdentityColumnString in class Dialectpublic String getIdentitySelectString()
Dialect
getIdentitySelectString in class Dialectpublic String getIdentityInsertString()
Dialect
getIdentityInsertString in class Dialectpublic String getForUpdateString()
Dialect
getForUpdateString in class Dialectpublic boolean supportsUnique()
Dialect
supportsUnique in class Dialectpublic boolean supportsLimit()
Dialect
supportsLimit in class Dialect
public String getLimitString(String sql,
boolean hasOffset)
Dialectvariable
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 Dialectsql - The query to which to apply the limit.hasOffset - Is the query requesting an offset?
public boolean bindLimitParametersInReverseOrder()
Dialect
bindLimitParametersInReverseOrder in class Dialectpublic boolean bindLimitParametersFirst()
Dialect
bindLimitParametersFirst in class Dialectpublic boolean supportsIfExistsAfterTableName()
supportsIfExistsAfterTableName in class Dialectpublic boolean supportsPooledSequences()
Dialect
supportsPooledSequences in class DialectDialect.getCreateSequenceStrings(String, int, int),
Dialect.getCreateSequenceString(String, int, int)
protected String getCreateSequenceString(String sequenceName)
throws MappingException
DialectDialect.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 DialectsequenceName - The name of the sequence
MappingException - If sequences are not supported.
protected String getDropSequenceString(String sequenceName)
throws MappingException
DialectDialect.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 DialectsequenceName - The name of the sequence
MappingException - If sequences are not supported.public String getSelectSequenceNextValString(String sequenceName)
DialectDialect.getSequenceNextValString(String) in that this
should return an expression usable within another statement.
getSelectSequenceNextValString in class DialectsequenceName - the name of the sequence
public String getSequenceNextValString(String sequenceName)
Dialect
getSequenceNextValString in class DialectsequenceName - the name of the sequence
public String getQuerySequencesString()
Dialect
getQuerySequencesString in class DialectSchemaUpdatepublic boolean supportsSequences()
Dialect
supportsSequences in class Dialectpublic ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter in class Dialectpublic boolean supportsTemporaryTables()
Dialect
supportsTemporaryTables in class Dialectpublic String getCreateTemporaryTableString()
Dialect
getCreateTemporaryTableString in class Dialectpublic boolean supportsCurrentTimestampSelection()
Dialect
supportsCurrentTimestampSelection in class Dialectpublic boolean isCurrentTimestampSelectStringCallable()
DialectDialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
sytnax is being used...
isCurrentTimestampSelectStringCallable in class DialectDialect.getCurrentTimestampSelectString() return
is callable; false otherwise.public String getCurrentTimestampSelectString()
Dialect
getCurrentTimestampSelectString in class Dialectpublic boolean supportsUnionAll()
Dialect
supportsUnionAll in class Dialectpublic boolean supportsLobValueChangePropogation()
DialectBlob.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 | |||||||||