org.hibernate.dialect
Class Ingres9Dialect

java.lang.Object
  extended by org.hibernate.dialect.Dialect
      extended by org.hibernate.dialect.IngresDialect
          extended by org.hibernate.dialect.Ingres9Dialect
Direct Known Subclasses:
Ingres10Dialect

public class Ingres9Dialect
extends IngresDialect

A SQL dialect for Ingres 9.3 and later versions.

Changes:

Author:
Enrico Schenk, Raymond Fan

Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE
 
Constructor Summary
Ingres9Dialect()
           
 
Method Summary
 boolean doesReadCommittedCauseWritersToBlockReaders()
          For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
 boolean doesRepeatableReadCauseReadersToBlockWriters()
          For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
 boolean forUpdateOfColumns()
          Is FOR UPDATE OF syntax supported?
 String getCurrentTimestampSelectString()
          Retrieve the command used to retrieve the current timestammp from the database.
 String getCurrentTimestampSQLFunctionName()
          Expression for current_timestamp
 String getIdentitySelectString()
          Get the select command used to retrieve the last generated sequence value.
 String getLimitString(String querySelect, int offset, int limit)
          Add a LIMIT clause to the given SQL SELECT
 String getQuerySequencesString()
          Get the select command used retrieve the names of all sequences.
 boolean isCurrentTimestampSelectStringCallable()
          Should the value returned by getCurrentTimestampSelectString() be treated as callable.
protected  void registerDateTimeColumnTypes()
          Register column types date, time, timestamp
protected  void registerDateTimeFunctions()
          Register functions current_time, current_timestamp, current_date
 boolean supportsCurrentTimestampSelection()
          Does this dialect support a way to retrieve the database's current timestamp value?
 boolean supportsLimitOffset()
          Does this dialect's LIMIT support (if any) additionally support specifying an offset?
 boolean supportsOuterJoinForUpdate()
          Does this dialect support FOR UPDATE in conjunction with outer joined rows?
 boolean supportsPooledSequences()
          Does this dialect support "pooled" sequences.
 boolean supportsUnionAll()
          Does this dialect support UNION ALL, which is generally a faster variant of UNION?
 boolean supportsVariableLimit()
          Does this dialect support bind variables (i.e., prepared statememnt parameters) for its limit/offset?
 boolean useMaxForLimit()
          Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?
 
Methods inherited from class org.hibernate.dialect.IngresDialect
dropConstraints, generateTemporaryTableName, getAddColumnString, getCreateSequenceString, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getDropSequenceString, getLowercaseFunction, getNullColumnString, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, supportsEmptyInList, supportsExpectedLobUsagePattern, supportsForUpdateOf, supportsLimit, supportsNotNullUnique, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTemporaryTables, supportsTupleDistinctCounts
 
Methods inherited from class org.hibernate.dialect.Dialect
addTypeOverride, appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, dropTemporaryTableAfterUse, forceLimitUsage, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getDropTemporaryTableString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getKeywords, getLimitString, getLockingStrategy, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getReadLockString, getResultSet, getSelectClauseNullString, getTableComment, getTableTypeString, getTypeName, getTypeName, getTypeOverrides, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isLockTimeoutParameterized, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExistsInSelect, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLobValueChangePropogation, supportsLockTimeouts, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSubqueryOnMutatingTable, supportsTableCheck, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ingres9Dialect

public Ingres9Dialect()
Method Detail

registerDateTimeFunctions

protected void registerDateTimeFunctions()
Register functions current_time, current_timestamp, current_date


registerDateTimeColumnTypes

protected void registerDateTimeColumnTypes()
Register column types date, time, timestamp


supportsOuterJoinForUpdate

public boolean supportsOuterJoinForUpdate()
Does this dialect support FOR UPDATE in conjunction with outer joined rows?

Overrides:
supportsOuterJoinForUpdate in class Dialect
Returns:
True if outer joined rows can be locked via FOR UPDATE.

forUpdateOfColumns

public boolean forUpdateOfColumns()
Is FOR UPDATE OF syntax supported?

Overrides:
forUpdateOfColumns in class Dialect
Returns:
True if the database supports FOR UPDATE OF syntax; false otherwise.

getIdentitySelectString

public String getIdentitySelectString()
Get the select command used to retrieve the last generated sequence value.

Overrides:
getIdentitySelectString in class Dialect
Returns:
Statement to retrieve last generated sequence value

getQuerySequencesString

public String getQuerySequencesString()
Get the select command used retrieve the names of all sequences.

Overrides:
getQuerySequencesString in class IngresDialect
Returns:
The select command; or null if sequences are not supported.
See Also:
SchemaUpdate

supportsPooledSequences

public boolean supportsPooledSequences()
Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?

Overrides:
supportsPooledSequences in class Dialect
Returns:
True if such "pooled" sequences are supported; false otherwise.
See Also:
Dialect.getCreateSequenceStrings(String, int, int), Dialect.getCreateSequenceString(String, int, int)

isCurrentTimestampSelectStringCallable

public boolean isCurrentTimestampSelectStringCallable()
Should the value returned by getCurrentTimestampSelectString() be treated as callable. Typically this indicates that JDBC escape sytnax is being used...

Overrides:
isCurrentTimestampSelectStringCallable in class Dialect
Returns:
True if the getCurrentTimestampSelectString() return is callable; false otherwise.

supportsCurrentTimestampSelection

public boolean supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database's current timestamp value?

Overrides:
supportsCurrentTimestampSelection in class Dialect
Returns:
True if the current timestamp can be retrieved; false otherwise.

getCurrentTimestampSelectString

public String getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestammp from the database.

Overrides:
getCurrentTimestampSelectString in class Dialect
Returns:
The command.

getCurrentTimestampSQLFunctionName

public String getCurrentTimestampSQLFunctionName()
Expression for current_timestamp

Overrides:
getCurrentTimestampSQLFunctionName in class IngresDialect
Returns:
The function name.

supportsUnionAll

public boolean supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster variant of UNION?

Overrides:
supportsUnionAll in class Dialect
Returns:
True if UNION ALL is supported; false otherwise.

doesReadCommittedCauseWritersToBlockReaders

public boolean doesReadCommittedCauseWritersToBlockReaders()
For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?

Overrides:
doesReadCommittedCauseWritersToBlockReaders in class Dialect
Returns:
true

doesRepeatableReadCauseReadersToBlockWriters

public boolean doesRepeatableReadCauseReadersToBlockWriters()
For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?

Overrides:
doesRepeatableReadCauseReadersToBlockWriters in class Dialect
Returns:
true

supportsLimitOffset

public boolean supportsLimitOffset()
Does this dialect's LIMIT support (if any) additionally support specifying an offset?

Overrides:
supportsLimitOffset in class IngresDialect
Returns:
true

supportsVariableLimit

public boolean supportsVariableLimit()
Does this dialect support bind variables (i.e., prepared statememnt parameters) for its limit/offset?

Overrides:
supportsVariableLimit in class IngresDialect
Returns:
false

useMaxForLimit

public boolean useMaxForLimit()
Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?

Overrides:
useMaxForLimit in class IngresDialect
Returns:
True if limit is relative from offset; false otherwise.

getLimitString

public String getLimitString(String querySelect,
                             int offset,
                             int limit)
Add a LIMIT clause to the given SQL SELECT

Overrides:
getLimitString in class IngresDialect
Parameters:
querySelect - The query to which to apply the limit.
offset - The offset of the limit
limit - The limit of the limit ;)
Returns:
the modified SQL


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.