java.lang.Object | ||
↳ | org.hibernate.dialect.Dialect | |
↳ | org.hibernate.dialect.Cache71Dialect |
Caché 2007.1 dialect. This class is required in order to use Hibernate with Intersystems Cach� SQL.
Compatible with Cach� 2007.1.
Property Name | Property Value |
---|---|
hibernate.dialect | org.hibernate.dialect.Cache71Dialect |
hibernate.connection.driver_class | com.intersys.jdbc.CacheDriver |
hibernate.connection.username | (see note 1) |
hibernate.connection.password | (see note 1) |
hibernate.connection.url | jdbc:Cache://127.0.0.1:1972/USER |
etc\CacheSequences.xmlFor example, at the COS terminal prompt in the namespace, run the following command:
d LoadFile^%apiOBJ("c:\hibernate\etc\CacheSequences.xml","ck")
In your Hibernate mapping you can specify sequence use.
For example, the following shows the use of a sequence generator in a Hibernate mapping:
<id name="id" column="uid" type="long" unsaved-value="null"> <generator class="sequence"/> </id>
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.hibernate.dialect.Dialect
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EXTRACTER |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates new
Cach�71Dialect instance. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Are string comparisons implicitly case insensitive.
| |||||||||||
Does the LIMIT clause come at the start of the
SELECT statement, rather than at the end?
| |||||||||||
Build an instance of the SQLExceptionConverter preferred by this dialect for
converting SQLExceptions into Hibernate's JDBCException hierarchy.
| |||||||||||
Create a
JoinFragment strategy responsible
for handling this dialect's variations in how joins are handled. | |||||||||||
Do we need to drop constraints before dropping tables in this dialect?
| |||||||||||
Do we need to drop the temporary table after use?
| |||||||||||
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.
| |||||||||||
Completely optional cascading drop clause
| |||||||||||
Get any fragments needing to be postfixed to the command for
temporary table creation.
| |||||||||||
Command used to create a temporary table.
| |||||||||||
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.
| |||||||||||
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
| |||||||||||
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.
| |||||||||||
Given a callable statement previously processed by
registerResultSetOutParameter(CallableStatement, int) ,
extract the ResultSet from the OUT parameter. | |||||||||||
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
| |||||||||||
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?
| |||||||||||
Registers an OUT parameter which will be returning a
ResultSet . | |||||||||||
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
| |||||||||||
Does this dialect support identity column key generation?
| |||||||||||
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 this dialect support FOR UPDATE in conjunction with
outer joined rows?
| |||||||||||
Does this dialect support asking the result set its positioning
information on forward only cursors.
| |||||||||||
Does this dialect support sequences?
| |||||||||||
Does this dialect support temporary tables?
| |||||||||||
Does this dialect support the UNIQUE column syntax?
| |||||||||||
Does this dialect support bind variables (i.e., prepared statement
parameters) for its limit/offset?
| |||||||||||
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.hibernate.dialect.Dialect
| |||||||||||
From class
java.lang.Object
|
Creates new Cach�71Dialect
instance. Sets up the JDBC /
Cach� type mappings.
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?
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.Create a JoinFragment
strategy responsible
for handling this dialect's variations in how joins are handled.
JoinFragment
strategy.
Do we need to drop constraints before dropping tables in this dialect?
Do we need to drop the temporary table after use?
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 |
Completely optional cascading drop clause
Get any fragments needing to be postfixed to the command for temporary table creation.
Command used to create a temporary table.
The syntax used during DDL to define a column as being an IDENTITY.
MappingException |
---|
Get the select command to use to retrieve the last generated IDENTITY value.
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)
.sql | The query to which to apply the limit. |
---|---|
hasOffset | Is the query requesting an offset? |
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
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.
Given a callable statement previously processed by registerResultSetOutParameter(CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.
ps | The callable statement. |
---|
SQLException |
---|
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
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?
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. |
---|---|
col | The bind position at which to register the OUT param. |
SQLException |
---|
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?Does this dialect support identity column key generation?
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 this dialect support FOR UPDATE in conjunction with outer joined rows?
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.Does this dialect support sequences?
Does this dialect support temporary tables?
Does this dialect support the UNIQUE column syntax?
Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
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?