java.lang.Object | |
↳ | org.hibernate.dialect.Dialect |
Known Direct Subclasses |
Represents a dialect of SQL implemented by a particular RDBMS.
Subclasses implement Hibernate compatibility with different systems.
Subclasses should provide a public default constructor that register()
a set of type mappings and default Hibernate properties.
Subclasses should be immutable.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | CLOSED_QUOTE | ||||||||||
String | DEFAULT_BATCH_SIZE | ||||||||||
String | NO_BATCH | ||||||||||
String | QUOTE | Characters used for quoting SQL identifiers |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Provided we
supportsInsertSelectIdentity() , then attach the
"select identity" clause to the insert statement. | |||||||||||
Some dialects support an alternative means to SELECT FOR UPDATE,
whereby a "lock hint" is appends to the table name in the from clause.
| |||||||||||
Modifies the given SQL by applying the appropriate updates for the specified
lock modes and key columns.
| |||||||||||
Are string comparisons implicitly case insensitive.
| |||||||||||
Does the LIMIT clause come at the start of the
SELECT statement, rather than at the end?
| |||||||||||
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.
| |||||||||||
Build an instance of the SQLExceptionConverter preferred by this dialect for
converting SQLExceptions into Hibernate's JDBCException hierarchy.
| |||||||||||
The character specific to this dialect used to close a quoted identifier.
| |||||||||||
Hibernate APIs explicitly state that setFirstResult() should be a zero-based offset.
| |||||||||||
Create a
CaseFragment strategy responsible
for handling this dialect's variations in how CASE statements are
handled. | |||||||||||
Create a
JoinFragment strategy responsible
for handling this dialect's variations in how joins are handled. | |||||||||||
For the underlying database, is READ_COMMITTED isolation implemented by
forcing readers to wait for write locks to be released?
| |||||||||||
For the underlying database, is REPEATABLE_READ isolation implemented by
forcing writers to wait for read locks to be released?
| |||||||||||
Do we need to drop constraints before dropping tables in this dialect?
| |||||||||||
Do we need to drop the temporary table after use?
| |||||||||||
Is FOR UPDATE OF syntax supported?
| |||||||||||
Generally, if there is no limit applied to a Hibernate query we do not apply any limits
to the SQL query.
| |||||||||||
Generate a temporary table name given the base table.
| |||||||||||
The syntax used to add a column to a table (optional).
| |||||||||||
The syntax used to add a foreign key constraint to a table.
| |||||||||||
The syntax used to add a primary key constraint to a table.
| |||||||||||
Completely optional cascading drop clause
| |||||||||||
Get the name of the database type appropriate for casting operations
(via the CAST() SQL function) for the given java.sql.Types typecode.
| |||||||||||
Slight variation on
getCreateTableString() . | |||||||||||
This method is deprecated.
Use
getCreateSequenceString(String, int, int) instead
| |||||||||||
An optional multi-line form for databases which
supportsPooledSequences() . | |||||||||||
Command used to create a table.
| |||||||||||
Get any fragments needing to be postfixed to the command for
temporary table creation.
| |||||||||||
Command used to create a temporary table.
| |||||||||||
Get the separator to use for defining cross joins when translating HQL queries.
| |||||||||||
The name of the database-specific SQL function for retrieving the
current timestamp.
| |||||||||||
Retrieve the command used to retrieve the current timestamp from the
database.
| |||||||||||
Retrieve a set of default Hibernate properties for this database.
| |||||||||||
Get an instance of the dialect specified by the current System properties.
| |||||||||||
Get an instance of the dialect specified by the given properties or by
the current System properties.
| |||||||||||
The multiline script used to drop a sequence.
| |||||||||||
Command used to drop a temporary table.
| |||||||||||
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
| |||||||||||
Get the FOR UPDATE OF column_list NOWAIT fragment appropriate
for this dialect given the aliases of the columns to be write locked.
| |||||||||||
Get the string to append to SELECT statements to acquire locks
for this dialect.
| |||||||||||
Get the FOR UPDATE OF column_list fragment appropriate for this
dialect given the aliases of the columns to be write locked.
| |||||||||||
Given LockOptions (lockMode, timeout), determine the appropriate for update fragment to use.
| |||||||||||
Get the FOR UPDATE OF column_list fragment appropriate for this
dialect given the aliases of the columns to be write locked.
| |||||||||||
Given a lock mode, determine the appropriate for update fragment to use.
| |||||||||||
Retrieves a map of the dialect's registered functions
(functionName =>
SQLFunction ). | |||||||||||
Get the name of the Hibernate
Type associated
with the given java.sql.Types typecode with the given storage
specification parameters. | |||||||||||
Get the name of the Hibernate
Type associated with the given
java.sql.Types typecode. | |||||||||||
The syntax used during DDL to define a column as being an IDENTITY of
a particular type.
| |||||||||||
The keyword used to insert a generated value into an identity column (or null).
| |||||||||||
Get the select command to use to retrieve the last generated IDENTITY
value for a particular table
| |||||||||||
Given a limit and an offset, apply the limit clause to the query.
| |||||||||||
Get a strategy instance which knows how to acquire a database-level lock
of the specified mode for this dialect.
| |||||||||||
The name of the SQL function that transforms a string to
lowercase
| |||||||||||
What is the maximum length Hibernate can use for generated aliases?
| |||||||||||
The class (which implements
IdentifierGenerator )
which acts as this dialects native generation strategy. | |||||||||||
The fragment used to insert a row without specifying any column values.
| |||||||||||
The keyword used to specify a nullable column.
| |||||||||||
Get the select command used retrieve the names of all sequences.
| |||||||||||
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
| |||||||||||
Given a callable statement previously processed by
registerResultSetOutParameter(CallableStatement, int) ,
extract the ResultSet from the OUT parameter. | |||||||||||
Given a java.sql.Types type code, determine an appropriate
null value to use in a select clause.
| |||||||||||
Get the command used to select a GUID from the underlying database.
| |||||||||||
Generate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement.
| |||||||||||
Generate the appropriate select statement to to retrieve the next value
of a sequence.
| |||||||||||
Get the name of the database type associated with the given
java.sql.Types typecode.
| |||||||||||
Get the name of the database type associated with the given
java.sql.Types typecode with the given storage specification
parameters.
| |||||||||||
Retrieve dialect-specific types for overriding "basic" types.
| |||||||||||
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
| |||||||||||
Does this dialect support the ALTER TABLE syntax?
| |||||||||||
Whether this dialect have an Identity clause added to the data type or a
completely separate identity data type
| |||||||||||
Should the value returned by
getCurrentTimestampSelectString()
be treated as callable. | |||||||||||
If this dialect supports specifying lock timeouts, are those timeouts
rendered into the SQL string as parameters.
| |||||||||||
The character specific to this dialect used to begin a quoted identifier.
| |||||||||||
Does the dialect require that temporary table DDL statements occur in
isolation from other statements? This would be the case if the creation
would cause any current transaction to get committed implicitly.
| |||||||||||
Do we need to qualify index names with the schema name?
| |||||||||||
Apply dialect-specific quoting.
| |||||||||||
Registers an OUT parameter which will be returning a
ResultSet . | |||||||||||
Does this dialect require that references to result variables
(i.e, select expresssion aliases) in an ORDER BY clause be
replaced by column positions (1-origin) as defined
by the select clause?
| |||||||||||
Does this dialect require that parameters appearing in the SELECT clause be wrapped in cast()
calls to tell the db parser the expected type.
| |||||||||||
Does this dialect support using a JDBC bind parameter as an argument
to a function or procedure call?
| |||||||||||
Does this dialect support definition of cascade delete constraints
which can cause circular chains?
| |||||||||||
Does this dialect support column-level check constraints?
| |||||||||||
Does this dialect support a way to retrieve the database's current
timestamp value?
| |||||||||||
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
| |||||||||||
Does the dialect support an exists statement in the select clause?
| |||||||||||
Expected LOB usage pattern is such that I can perform an insert
via prepared statement with a parameter binding for a LOB value
without crazy casting to JDBC driver implementation-specific classes...
| |||||||||||
Does this dialect support identity column key generation?
| |||||||||||
Does the dialect support some form of inserting and selecting
the generated IDENTITY value all in the same statement.
| |||||||||||
Does this dialect support some form of limiting query results
via a SQL clause?
| |||||||||||
Does this dialect's LIMIT support (if any) additionally
support specifying an offset?
| |||||||||||
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...
| |||||||||||
Informational metadata about whether this dialect is known to support
specifying timeouts for requested lock acquisitions.
| |||||||||||
Does this dialect support FOR UPDATE in conjunction with
outer joined rows?
| |||||||||||
Does this dialect support parameters within the SELECT clause of
INSERT ...
| |||||||||||
Does this dialect support "pooled" sequences.
| |||||||||||
Does this dialect support asking the result set its positioning
information on forward only cursors.
| |||||||||||
Is this dialect known to support what ANSI-SQL terms "row value
constructor" syntax; sometimes called tuple syntax.
| |||||||||||
If the dialect supports
row values ,
does it offer such support in IN lists as well?
For example, "... | |||||||||||
Does this dialect support sequences?
| |||||||||||
Does this dialect support referencing the table being mutated in
a subquery.
| |||||||||||
Are subselects supported as the left-hand-side (LHS) of
IN-predicates.
| |||||||||||
Does this dialect support table-level check constraints?
| |||||||||||
Does this dialect support temporary tables?
| |||||||||||
Does this dialect support `count(a,b)`?
| |||||||||||
Does this dialect support `count(distinct a,b)`?
| |||||||||||
Is it supported to materialize a LOB locator outside the transaction in
which it was created?
Again, part of the trickiness here is the fact that this is largely
driver dependent.
| |||||||||||
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
| |||||||||||
Does this dialect support the UNIQUE column syntax?
| |||||||||||
Does this dialect support adding Unique constraints via create and alter table ?
| |||||||||||
Does this dialect support bind variables (i.e., prepared statement
parameters) for its limit/offset?
| |||||||||||
The SQL literal value to which this database maps boolean values.
| |||||||||||
Meant as a means for end users to affect the select strings being sent
to the database and perhaps manipulate them in some fashion.
| |||||||||||
Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
| |||||||||||
Does the LIMIT clause take a "maximum" row number instead
of a total number of returned rows?
This is easiest understood via an example.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Overloaded form of
getCreateSequenceString(String) , additionally
taking the initial value and increment size to be applied to the sequence
definition. | |||||||||||
Typically dialects which support sequences can create a sequence
with a single command.
| |||||||||||
Typically dialects which support sequences can drop a sequence
with a single command.
| |||||||||||
The syntax used during DDL to define a column as being an IDENTITY.
| |||||||||||
Get the select command to use to retrieve the last generated IDENTITY
value.
| |||||||||||
Apply s limit clause to the query.
| |||||||||||
Subclasses register a type name for the given type code and maximum
column length.
| |||||||||||
Subclasses register a type name for the given type code.
| |||||||||||
Registers a Hibernate
Type name for the given
java.sql.Types type code. | |||||||||||
Registers a Hibernate
Type name for the given
java.sql.Types type code and maximum column length. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Provided we supportsInsertSelectIdentity()
, then attach the
"select identity" clause to the insert statement.
supportsInsertSelectIdentity()
== false then
the insert-string should be returned without modification.insertString | The insert command |
---|
Some dialects support an alternative means to SELECT FOR UPDATE, whereby a "lock hint" is appends to the table name in the from clause.
contributed by Helge Schulzmode | The lock mode to apply |
---|---|
tableName | The name of the table to which to apply the lock hint. |
Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.
The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This method is really intended to allow dialects which do not support SELECT FOR UPDATE to achieve this in their own fashion.sql | the SQL string to modify |
---|---|
aliasedLockOptions | lock options indexed by aliased table names. |
keyColumnNames | a map of key columns indexed by aliased table names. |
Are string comparisons implicitly case insensitive.
In other words, does [where 'XYZ' = 'xyz'] resolve to true?Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. Does this dialect require us to bind the parameters in reverse order?
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.The character specific to this dialect used to close a quoted identifier.
Hibernate APIs explicitly state that setFirstResult() should be a zero-based offset. Here we allow the Dialect a chance to convert that value based on what the underlying db or driver will expect.
NOTE: what gets passed intogetLimitString(String, int, int)
is the zero-based offset. Dialects which
do not supportsVariableLimit()
should take care to perform any needed convertToFirstRowValue(int)
calls prior to injecting the limit values into the SQL string.zeroBasedFirstResult | The user-supplied, zero-based first row offset. |
---|
Create a CaseFragment
strategy responsible
for handling this dialect's variations in how CASE statements are
handled.
CaseFragment
strategy.
Create a JoinFragment
strategy responsible
for handling this dialect's variations in how joins are handled.
JoinFragment
strategy.
For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
Do we need to drop constraints before dropping tables in this dialect?
Do we need to drop the temporary table after use?
Is FOR UPDATE OF syntax supported?
Generally, if there is no limit applied to a Hibernate query we do not apply any limits to the SQL query. This option forces that the limit be written to the SQL query.
Generate a temporary table name given the base table.
baseTableName | The table name from which to base the temp table name. |
---|
The syntax used to add a column to a table (optional).
The syntax used to add a foreign key constraint to a table.
constraintName | The FK constraint name. |
---|---|
foreignKey | The names of the columns comprising the FK |
referencedTable | The table referenced by the FK |
primaryKey | The explicit columns in the referencedTable referenced by this FK. |
referencesPrimaryKey | if false, constraint should be explicit about which column names the constraint refers to |
The syntax used to add a primary key constraint to a table.
constraintName | The name of the PK constraint. |
---|
Completely optional cascading drop clause
Get the name of the database type appropriate for casting operations (via the CAST() SQL function) for the given java.sql.Types typecode.
code | The java.sql.Types typecode |
---|
Slight variation on getCreateTableString()
. Here, we have the
command used to create a table when there is no primary key and
duplicate rows are expected.
This method is deprecated.
Use getCreateSequenceString(String, int, int)
instead
The multiline script used to create a sequence.
sequenceName | The name of the sequence |
---|
MappingException | If sequences are not supported. |
---|
An optional multi-line form for databases which supportsPooledSequences()
.
sequenceName | The name of the sequence |
---|---|
initialValue | The initial value to apply to 'create sequence' statement |
incrementSize | The increment value to apply to 'create sequence' statement |
MappingException | If sequences are not supported. |
---|
Command used to create a table.
Get any fragments needing to be postfixed to the command for temporary table creation.
Command used to create a temporary table.
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!The name of the database-specific SQL function for retrieving the current timestamp.
Retrieve the command used to retrieve the current timestamp from the database.
Retrieve a set of default Hibernate properties for this database.
Get an instance of the dialect specified by the current System properties.
HibernateException | If no dialect was specified, or if it could not be instantiated. |
---|
Get an instance of the dialect specified by the given properties or by the current System properties.
props | The properties to use for finding the dialect class to use. |
---|
HibernateException | If no dialect was specified, or if it could not be instantiated. |
---|
The multiline script used to drop a sequence.
sequenceName | The name of the sequence |
---|
MappingException | If sequences are not supported. |
---|
Command used to drop a temporary table.
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.
aliases | The columns to be write locked. |
---|
Get the string to append to SELECT statements to acquire locks for this dialect.
Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
aliases | The columns to be write locked. |
---|
Given LockOptions (lockMode, timeout), determine the appropriate for update fragment to use.
lockOptions | contains the lock mode to apply. |
---|
Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
aliases | The columns to be write locked. |
---|
Given a lock mode, determine the appropriate for update fragment to use.
lockMode | The lock mode to apply. |
---|
Retrieves a map of the dialect's registered functions
(functionName => SQLFunction
).
Get the name of the Hibernate Type
associated
with the given java.sql.Types typecode with the given storage
specification parameters.
code | The java.sql.Types typecode |
---|---|
length | The datatype length |
precision | The datatype precision |
scale | The datatype scale |
Type
name.HibernateException | If no mapping was specified for that type. |
---|
Get the name of the Hibernate Type
associated with the given
java.sql.Types typecode.
code | The java.sql.Types typecode |
---|
Type
name.HibernateException | If no mapping was specified for that type. |
---|
The syntax used during DDL to define a column as being an IDENTITY of a particular type.
type | The java.sql.Types type code. |
---|
MappingException | If IDENTITY generation is not supported. |
---|
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.
Get the select command to use to retrieve the last generated IDENTITY value for a particular table
table | The table into which the insert was done |
---|---|
column | The PK column. |
type | The java.sql.Types type code. |
MappingException | If IDENTITY generation is not supported. |
---|
Given a limit and an offset, apply the limit clause to the query.
query | The query to which to apply the limit. |
---|---|
offset | The offset of the limit |
limit | The limit of the limit ;) |
Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect.
lockable | The persister for the entity to be locked. |
---|---|
lockMode | The type of lock to be acquired. |
The name of the SQL function that transforms a string to lowercase
What is the maximum length Hibernate can use for generated aliases?
The class (which implements IdentifierGenerator
)
which acts as this dialects native generation strategy.
The fragment used to insert a row without specifying any column values. This is not possible on some databases.
Get the select command used retrieve the names of all sequences.
Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.
timeout | in milliseconds, -1 for indefinite wait and 0 for no wait. |
---|
Given a callable statement previously processed by registerResultSetOutParameter(CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.
statement | The callable statement. |
---|
SQLException | Indicates problems extracting the result set. |
---|
Given a java.sql.Types type code, determine an appropriate null value to use in a select clause.
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.sqlType | The java.sql.Types type code. |
---|
Get the command used to select a GUID from the underlying database.
Optional operation.Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
This differs fromgetSequenceNextValString(String)
in that this
should return an expression usable within another statement.sequenceName | the name of the sequence |
---|
MappingException | If sequences are not supported. |
---|
Generate the appropriate select statement to to retrieve the next value of a sequence.
This should be a "stand alone" select statement.sequenceName | the name of the sequence |
---|
MappingException | If sequences are not supported. |
---|
Get the name of the database type associated with the given java.sql.Types typecode.
code | The java.sql.Types typecode |
---|
HibernateException | If no mapping was specified for that type. |
---|
Get the name of the database type associated with the given java.sql.Types typecode with the given storage specification parameters.
code | The java.sql.Types typecode |
---|---|
length | The datatype length |
precision | The datatype precision |
scale | The datatype scale |
HibernateException | If no mapping was specified for that type. |
---|
Retrieve dialect-specific types for overriding "basic" types.
Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.
timeout | in milliseconds, -1 for indefinite wait and 0 for no wait. |
---|
Does this dialect support the ALTER TABLE syntax?
Whether this dialect have an Identity clause added to the data type or a completely separate identity data type
Should the value returned by getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used...
getCurrentTimestampSelectString()
return
is callable; false otherwise.
If this dialect supports specifying lock timeouts, are those timeouts
rendered into the SQL string as parameters. The implication
is that Hibernate will need to bind the timeout value as a parameter
in the PreparedStatement
. If true, the param position
is always handled as the last parameter; if the dialect specifies the
lock timeout elsewhere in the SQL statement then the timeout
value should be directly rendered into the statement and this method
should return false.
The character specific to this dialect used to begin a quoted identifier.
Does the dialect require that temporary table DDL statements occur in isolation from other statements? This would be the case if the creation would cause any current transaction to get committed implicitly.
JDBC defines a standard way to query for this information via thedataDefinitionCausesTransactionCommit()
method. However, that does not distinguish between temporary table
DDL and other forms of DDL; MySQL, for example, reports DDL causing a
transaction commit via its driver, even though that is not the case for
temporary table DDL.
Possible return values and their meanings:TRUE
- Unequivocally, perform the temporary table DDL
in isolation.FALSE
- Unequivocally, do not perform the
temporary table DDL in isolation.dataDefinitionCausesTransactionCommit()
Do we need to qualify index names with the schema name?
Apply dialect-specific quoting.
By default, the incoming value is checked to see if its first character is the back-tick (`). If so, the dialect specific quoting is applied.name | The value to be quoted. |
---|
Registers an OUT parameter which will be returning a
ResultSet
. How this is accomplished varies greatly
from DB to DB, hence its inclusion (along with getResultSet(CallableStatement)
) here.
statement | The callable statement. |
---|---|
position | The bind position at which to register the OUT param. |
SQLException | Indicates problems registering the OUT param. |
---|
Does this dialect require that references to result variables (i.e, select expresssion aliases) in an ORDER BY clause be replaced by column positions (1-origin) as defined by the select clause?
Does this dialect require that parameters appearing in the SELECT clause be wrapped in cast() calls to tell the db parser the expected type.
Does this dialect support using a JDBC bind parameter as an argument to a function or procedure call?
Does this dialect support definition of cascade delete constraints which can cause circular chains?
Does this dialect support column-level check constraints?
Does this dialect support a way to retrieve the database's current timestamp value?
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?Does the dialect support an exists statement in the select clause?
Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...
Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers...Does this dialect support identity column key generation?
Does the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.
Does this dialect support some form of limiting query results via a SQL clause?
Does this dialect's LIMIT support (if any) additionally support specifying an offset?
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:setBinaryStream(long)
,
setBytes(long, byte[])
,
setBytes(long, byte[], int, int)
,
or truncate(long)
.
For CLOBs, the internal value might be changed by:
setAsciiStream(long)
,
setCharacterStream(long)
,
setString(long, String)
,
setString(long, String, int, int)
,
or 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 supportsExpectedLobUsagePattern()
.Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
Does this dialect support FOR UPDATE in conjunction with outer joined rows?
Does this dialect support parameters within the SELECT clause of INSERT ... SELECT ... statements?
Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?
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
isAfterLast()
and
isBeforeFirst()
. Certain drivers do not
allow access to these methods for forward only cursors.
isAfterLast()
and
isBeforeFirst()
are supported for forward
only cursors; false otherwise.Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.
Basically, does it support syntax like "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...".If the dialect supports row values
,
does it offer such support in IN lists as well?
Does this dialect support sequences?
Does this dialect support referencing the table being mutated in a subquery. The "table being mutated" is the table referenced in an UPDATE or a DELETE query. And so can that table then be referenced in a subquery of said UPDATE/DELETE query.
For example, would the following two syntaxes be supported:Are subselects supported as the left-hand-side (LHS) of IN-predicates.
In other words, is syntax like "...Does this dialect support table-level check constraints?
Does this dialect support temporary tables?
Does this dialect support `count(a,b)`?
Does this dialect support `count(distinct a,b)`?
Is it supported to materialize a LOB locator outside the transaction in which it was created?
Again, part of the trickiness here is the fact that this is largely driver dependent. NOTE: all database I have tested whichsupportsExpectedLobUsagePattern()
also support the ability to materialize a LOB outside the owning transaction...Does this dialect support UNION ALL, which is generally a faster variant of UNION?
Does this dialect support the UNIQUE column syntax?
Does this dialect support adding Unique constraints via create and alter table ?
Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
The SQL literal value to which this database maps boolean values.
bool | The boolean value |
---|
Meant as a means for end users to affect the select strings being sent to the database and perhaps manipulate them in some fashion.
The recommend approach is to instead useonPrepareStatement(String)
.select | The select command |
---|
Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
setBinaryStream(int, InputStream)
).
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?Overloaded form of getCreateSequenceString(String)
, additionally
taking the initial value and increment size to be applied to the sequence
definition.
getCreateSequenceString(String)
with the string: " start with {initialValue} increment by {incrementSize}" where
{initialValue} and {incrementSize} are replacement placeholders. Generally
dialects should only need to override this method if different key phrases
are used to apply the allocation information.sequenceName | The name of the sequence |
---|---|
initialValue | The initial value to apply to 'create sequence' statement |
incrementSize | The increment value to apply to 'create sequence' statement |
MappingException | If sequences are not supported. |
---|
Typically dialects which support sequences can create a sequence
with a single command. This is convenience form of
getCreateSequenceStrings(String)
to help facilitate that.
getCreateSequenceStrings(String)
.sequenceName | The name of the sequence |
---|
MappingException | If sequences are not supported. |
---|
Typically dialects which support sequences can drop a sequence
with a single command. This is convenience form of
getDropSequenceStrings(String)
to help facilitate that.
getDropSequenceStrings(String)
.sequenceName | The name of the sequence |
---|
MappingException | If sequences are not supported. |
---|
The syntax used during DDL to define a column as being an IDENTITY.
MappingException | If IDENTITY generation is not supported. |
---|
Get the select command to use to retrieve the last generated IDENTITY value.
MappingException | If IDENTITY generation is not supported. |
---|
Apply s limit clause to the query.
Typically dialects utilizevariable
limit clauses 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
getLimitString(String, int, int)
.query | The query to which to apply the limit. |
---|---|
hasOffset | Is the query requesting an offset? |
Subclasses register a type name for the given type code and maximum column length. $l in the type name with be replaced by the column length (if appropriate).
code | The java.sql.Types typecode |
---|---|
capacity | The maximum length of database type |
name | The database type name |
Subclasses register a type name for the given type code. $l in the type name with be replaced by the column length (if appropriate).
code | The java.sql.Types typecode |
---|---|
name | The database type name |