Package org.hibernate.dialect
Class Ingres9Dialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.dialect.IngresDialect
org.hibernate.dialect.Ingres9Dialect
- Direct Known Subclasses:
Ingres10Dialect
A SQL dialect for Ingres 9.3 and later versions.
Changes:
- Support for the SQL functions current_time, current_timestamp and current_date added
- Type mapping of
Types.TIMESTAMPchanged from "timestamp with time zone" to "timestamp(9) with time zone" - Improved handling of "SELECT...FOR UPDATE" statements
- Added support for pooled sequences
- Added support for SELECT queries with limit and offset
- Added getIdentitySelectString
- Modified concatination operator
-
Field Summary
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanFor the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?booleanFor the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?booleanIs FOR UPDATE OF syntax supported?Retrieve the command used to retrieve the current timestammp from the database.Expression for current_timestampGet the select command used to retrieve the last generated sequence value.getLimitString(String querySelect, int offset, int limit) Add a LIMIT clause to the given SQL SELECTGet the select command used retrieve the names of all sequences.booleanShould the value returned bygetCurrentTimestampSelectString()be treated as callable.protected voidRegister column types date, time, timestampprotected voidRegister functions current_time, current_timestamp, current_datebooleanDoes this dialect support a way to retrieve the database's current timestamp value?booleanDoes this dialect's LIMIT support (if any) additionally support specifying an offset?booleanDoes this dialect support FOR UPDATE in conjunction with outer joined rows?booleanDoes this dialect support "pooled" sequences.booleanDoes this dialect support UNION ALL, which is generally a faster variant of UNION?booleanDoes this dialect support bind variables (i.e., prepared statememnt parameters) for its limit/offset?booleanDoes 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, supportsTupleDistinctCountsMethods 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
-
Constructor Details
-
Ingres9Dialect
public Ingres9Dialect()
-
-
Method Details
-
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:
supportsOuterJoinForUpdatein classDialect- Returns:
- True if outer joined rows can be locked via FOR UPDATE.
-
forUpdateOfColumns
public boolean forUpdateOfColumns()Is FOR UPDATE OF syntax supported?- Overrides:
forUpdateOfColumnsin classDialect- Returns:
- True if the database supports FOR UPDATE OF syntax; false otherwise.
-
getIdentitySelectString
Get the select command used to retrieve the last generated sequence value.- Overrides:
getIdentitySelectStringin classDialect- Returns:
- Statement to retrieve last generated sequence value
-
getQuerySequencesString
Get the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesStringin classIngresDialect- Returns:
- The select command; or null if sequences are not supported.
- See Also:
-
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:
supportsPooledSequencesin classDialect- Returns:
- True if such "pooled" sequences are supported; false otherwise.
- See Also:
-
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()Should the value returned bygetCurrentTimestampSelectString()be treated as callable. Typically this indicates that JDBC escape sytnax is being used...- Overrides:
isCurrentTimestampSelectStringCallablein classDialect- 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:
supportsCurrentTimestampSelectionin classDialect- Returns:
- True if the current timestamp can be retrieved; false otherwise.
-
getCurrentTimestampSelectString
Retrieve the command used to retrieve the current timestammp from the database.- Overrides:
getCurrentTimestampSelectStringin classDialect- Returns:
- The command.
-
getCurrentTimestampSQLFunctionName
Expression for current_timestamp- Overrides:
getCurrentTimestampSQLFunctionNamein classIngresDialect- Returns:
- The function name.
-
supportsUnionAll
public boolean supportsUnionAll()Does this dialect support UNION ALL, which is generally a faster variant of UNION?- Overrides:
supportsUnionAllin classDialect- 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:
doesReadCommittedCauseWritersToBlockReadersin classDialect- 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:
doesRepeatableReadCauseReadersToBlockWritersin classDialect- Returns:
- true
-
supportsLimitOffset
public boolean supportsLimitOffset()Does this dialect's LIMIT support (if any) additionally support specifying an offset?- Overrides:
supportsLimitOffsetin classIngresDialect- Returns:
- true
-
supportsVariableLimit
public boolean supportsVariableLimit()Does this dialect support bind variables (i.e., prepared statememnt parameters) for its limit/offset?- Overrides:
supportsVariableLimitin classIngresDialect- Returns:
- false
-
useMaxForLimit
public boolean useMaxForLimit()Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?- Overrides:
useMaxForLimitin classIngresDialect- Returns:
- True if limit is relative from offset; false otherwise.
-
getLimitString
Add a LIMIT clause to the given SQL SELECT- Overrides:
getLimitStringin classIngresDialect- Parameters:
querySelect- The query to which to apply the limit.offset- The offset of the limitlimit- The limit of the limit ;)- Returns:
- the modified SQL
-