| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: zeroBasedFirstResultThe user-supplied, zero-based offset zeroBasedFirstResult)Overrides org. |
| public boolean | doesReadCommittedCauseWritersToBlockReaders()
Overrides org. |
| public boolean | dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
| public String | generateTemporaryTableName(String
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).
|
| public String | getCreateSequenceString(String
The name of the sequence sequenceName)Overrides org. |
| public String | getCreateTemporaryTablePostfix()
Overrides org. |
| public String | getCreateTemporaryTableString()
Overrides org. |
| public String | getCrossJoinSeparator()
Overrides org. |
| public String | getCurrentTimestampSelectString()
Overrides org. |
| public String | getDropSequenceString(String
The name of the sequence sequenceName)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 String | getLowercaseFunction()
Overrides org. |
| public String | getQuerySequencesString()
Overrides org. |
| public ResultSet | getResultSet(CallableStatement
The callable statement. ps)Overrides org. registerResultSetOutParameter,
extract the java. from the OUT parameter.
|
| private String | |
| 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 | getSequenceNextValString(String
the name of the sequence sequenceName)Overrides org. |
| private static boolean | |
| public boolean | isCurrentTimestampSelectStringCallable()
Overrides org. getCurrentTimestampSelectString
be treated as callable.
|
| public static void | |
| public int | registerResultSetOutParameter(CallableStatement
The callable statement. statement, int The bind position at which to register the OUT param. col)Overrides org. java..
|
| public boolean | Returns: True.Overrides org. |
| public boolean | |
| public boolean | supportsCurrentTimestampSelection()
Overrides org. |
| public boolean | supportsEmptyInList()
Overrides org. |
| public boolean | supportsIdentityColumns()
Overrides org. |
| public boolean | supportsLimit()
Overrides org. |
| public boolean | supportsLobValueChangePropogation()
Overrides org. |
| public boolean | |
| public boolean | supportsOuterJoinForUpdate()
Overrides org. |
| public boolean | Returns: True.Overrides org. |
| public boolean | supportsPooledSequences()
Overrides org. |
| public boolean | supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
Overrides org. |
| public boolean | supportsSequences()
Does this dialect support sequences?
|
| public boolean | supportsTemporaryTables()
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 | useMaxForLimit()
Overrides org. |
| DB2Dialect | back to summary |
|---|---|
| public DB2Dialect() | |
| convertToFirstRowValue | back to summary |
|---|---|
| public int convertToFirstRowValue(int zeroBasedFirstResult) Overrides org. DB2 does have a one-based offset, however this was actually already handled in the limit string building (the '?+1' bit). To not mess up inheritors, I'll leave that part alone and not touch the offset here.
| |
| doesReadCommittedCauseWritersToBlockReaders | back to summary |
|---|---|
| public boolean doesReadCommittedCauseWritersToBlockReaders() Overrides org. Doc from org. For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
| |
| dropConstraints | back to summary |
|---|---|
| public boolean dropConstraints() Overrides org. Doc from org. Do we need to drop constraints before dropping tables in this dialect?
| |
| generateTemporaryTableName | back to summary |
|---|---|
| public String generateTemporaryTableName(String baseTableName) Overrides org. Doc from org. Generate a temporary table name given the base table. | |
| 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 |
|---|---|
| public 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. Doc from org. Get any fragments needing to be postfixed to the command for temporary table creation.
| |
| getCreateTemporaryTableString | back to summary |
|---|---|
| public String getCreateTemporaryTableString() Overrides org. Doc from org. Command used to create a temporary table.
| |
| getCrossJoinSeparator | back to summary |
|---|---|
| public String getCrossJoinSeparator() Overrides org. Doc from org. Get the separator to use for defining cross joins when translating HQL queries. Typically this will be either [ cross join ] or [, ] Note that the spaces are important! | |
| getCurrentTimestampSelectString | back to summary |
|---|---|
| public String getCurrentTimestampSelectString() Overrides org. Doc from org. Retrieve the command used to retrieve the current timestamp from the database.
| |
| getDropSequenceString | back to summary |
|---|---|
| public 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 | |
| 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
| |
| getLowercaseFunction | back to summary |
|---|---|
| public String getLowercaseFunction() Overrides org. Doc from org. The name of the SQL function that transforms a string to lowercase
| |
| getQuerySequencesString | back to summary |
|---|---|
| public String getQuerySequencesString() Overrides org. Doc from org. Get the select command used retrieve the names of all sequences.
| |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet(CallableStatement ps) throws SQLException Overrides org. Doc from org. Given a callable statement previously processed by
| |
| getRowNumber | back to summary |
|---|---|
| private String getRowNumber(String sql) Render the rownumber() over ( .... ) as rownumber_, bit, that goes in the select list | |
| 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.
| |
| 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. | |
| hasDistinct | back to summary |
|---|---|
| private static boolean hasDistinct(String sql) | |
| isCurrentTimestampSelectStringCallable | back to summary |
|---|---|
| public boolean isCurrentTimestampSelectStringCallable() Overrides org. Doc from org. Should the value returned by
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) | |
| registerResultSetOutParameter | back to summary |
|---|---|
| public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException Overrides org. Doc from org. Registers an OUT parameter which will be returning a
| |
| requiresCastingOfParametersInSelectClause | back to summary |
|---|---|
| public boolean requiresCastingOfParametersInSelectClause() Overrides org. DB2 in fact does require that parameters appearing in the select clause be wrapped in cast() calls to tell the DB parser the type of the select value.
| |
| supportsCommentOn | back to summary |
|---|---|
| public boolean supportsCommentOn() | |
| supportsCurrentTimestampSelection | back to summary |
|---|---|
| public boolean supportsCurrentTimestampSelection() Overrides org. Doc from org. Does this dialect support a way to retrieve the database's current timestamp value?
| |
| 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?
| |
| 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
| |
| supportsNotNullUnique | back to summary |
|---|---|
| public boolean supportsNotNullUnique() Overrides org. | |
| supportsOuterJoinForUpdate | back to summary |
|---|---|
| public boolean supportsOuterJoinForUpdate() Overrides org. Doc from org. Does this dialect support FOR UPDATE in conjunction with outer joined rows?
| |
| supportsParametersInInsertSelect | back to summary |
|---|---|
| public boolean supportsParametersInInsertSelect() Overrides org. Doc from org. Does this dialect support parameters within the SELECT clause of INSERT ... SELECT ... statements?
DB2 is know to support parameters in the SELECT clause, but only in casted form
(see
| |
| 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?
| |
| supportsResultSetPositionQueryMethodsOnForwardOnlyCursor | back to summary |
|---|---|
| public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor() Overrides org. Doc from org. Does this dialect support asking the result set its positioning
information on forward only cursors. Specifically, in the case of
scrolling fetches, Hibernate needs to use
NOTE : this is highly driver dependent!
| |
| 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. Doc from 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?
| |
| useMaxForLimit | back to summary |
|---|---|
| public boolean useMaxForLimit() Overrides org. Doc from org. Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows? This is easiest understood via an example. Consider you have a table with 20 rows, but you only want to retrieve rows number 11 through 20. Generally, a limit with offset would say that the offset = 11 and the limit = 10 (we only want 10 rows at a time); this is specifying the total number of returned rows. Some dialects require that we instead specify offset = 11 and limit = 20, where 20 is the "last" row we want relative to offset (i.e. total number of rows = 20 - 11 = 9) So essentially, is limit relative from offset? Or is limit absolute?
| |