Package org.hibernate.dialect
Class Ingres9Dialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.IngresDialect
-
- org.hibernate.dialect.Ingres9Dialect
-
- All Implemented Interfaces:
ConversionContext
- Direct Known Subclasses:
Ingres10Dialect
public class Ingres9Dialect extends IngresDialect
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.TIMESTAMP
changed 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, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description Ingres9Dialect()
Constructs a Ingres9Dialect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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?java.lang.String
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the database.java.lang.String
getCurrentTimestampSQLFunctionName()
The name of the database-specific SQL function for retrieving the current timestamp.LimitHandler
getDefaultLimitHandler()
IdentityColumnSupport
getIdentityColumnSupport()
Get the appropriateIdentityColumnSupport
java.lang.String
getLimitString(java.lang.String querySelect, int offset, int limit)
Given a limit and an offset, apply the limit clause to the query.java.lang.String
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.boolean
isCurrentTimestampSelectStringCallable()
Should the value returned byDialect.getCurrentTimestampSelectString()
be treated as callable.protected void
registerDateTimeColumnTypes()
Register column types date, time, timestampprotected void
registerDateTimeFunctions()
Register functions current_time, current_timestamp, current_dateboolean
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 statement 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, getAddColumnString, getCreateSequenceString, getDefaultMultiTableBulkIdStrategy, getDropSequenceString, getLimitHandler, getLowercaseFunction, getNullColumnString, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, supportsEmptyInList, supportsExpectedLobUsagePattern, supportsLimit, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTupleDistinctCounts
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNotExpression, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSqlTypeDescriptorOverride, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExistsInSelect, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
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()
Description copied from class:Dialect
Does this dialect support FOR UPDATE in conjunction with outer joined rows?- Overrides:
supportsOuterJoinForUpdate
in classDialect
- Returns:
- True if outer joined rows can be locked via FOR UPDATE.
-
forUpdateOfColumns
public boolean forUpdateOfColumns()
Description copied from class:Dialect
Is FOR UPDATE OF syntax supported?- Overrides:
forUpdateOfColumns
in classDialect
- Returns:
- True if the database supports FOR UPDATE OF syntax; false otherwise.
-
getQuerySequencesString
public java.lang.String getQuerySequencesString()
Description copied from class:Dialect
Get the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesString
in classIngresDialect
- Returns:
- The select command; or null if sequences are not supported.
- See Also:
SchemaUpdate
-
supportsPooledSequences
public boolean supportsPooledSequences()
Description copied from class:Dialect
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 classDialect
- 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()
Description copied from class:Dialect
Should the value returned byDialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape syntax is being used...- Overrides:
isCurrentTimestampSelectStringCallable
in classDialect
- Returns:
- True if the
Dialect.getCurrentTimestampSelectString()
return is callable; false otherwise.
-
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()
Description copied from class:Dialect
Does this dialect support a way to retrieve the database's current timestamp value?- Overrides:
supportsCurrentTimestampSelection
in classDialect
- Returns:
- True if the current timestamp can be retrieved; false otherwise.
-
getCurrentTimestampSelectString
public java.lang.String getCurrentTimestampSelectString()
Description copied from class:Dialect
Retrieve the command used to retrieve the current timestamp from the database.- Overrides:
getCurrentTimestampSelectString
in classDialect
- Returns:
- The command.
-
getCurrentTimestampSQLFunctionName
public java.lang.String getCurrentTimestampSQLFunctionName()
Description copied from class:Dialect
The name of the database-specific SQL function for retrieving the current timestamp.- Overrides:
getCurrentTimestampSQLFunctionName
in classIngresDialect
- Returns:
- The function name.
-
supportsUnionAll
public boolean supportsUnionAll()
Description copied from class:Dialect
Does this dialect support UNION ALL, which is generally a faster variant of UNION?- Overrides:
supportsUnionAll
in classDialect
- Returns:
- True if UNION ALL is supported; false otherwise.
-
doesReadCommittedCauseWritersToBlockReaders
public boolean doesReadCommittedCauseWritersToBlockReaders()
Description copied from class:Dialect
For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?- Overrides:
doesReadCommittedCauseWritersToBlockReaders
in classDialect
- Returns:
- True if writers block readers to achieve READ_COMMITTED; false otherwise.
-
doesRepeatableReadCauseReadersToBlockWriters
public boolean doesRepeatableReadCauseReadersToBlockWriters()
Description copied from class:Dialect
For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?- Overrides:
doesRepeatableReadCauseReadersToBlockWriters
in classDialect
- Returns:
- True if readers block writers to achieve REPEATABLE_READ; false otherwise.
-
getDefaultLimitHandler
public LimitHandler getDefaultLimitHandler()
- Overrides:
getDefaultLimitHandler
in classIngresDialect
-
supportsLimitOffset
public boolean supportsLimitOffset()
Description copied from class:Dialect
Does this dialect's LIMIT support (if any) additionally support specifying an offset?- Overrides:
supportsLimitOffset
in classIngresDialect
- Returns:
- True if the dialect supports an offset within the limit support.
-
supportsVariableLimit
public boolean supportsVariableLimit()
Description copied from class:Dialect
Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?- Overrides:
supportsVariableLimit
in classIngresDialect
- Returns:
- True if bind variables can be used; false otherwise.
-
useMaxForLimit
public boolean useMaxForLimit()
Description copied from class:Dialect
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?- Overrides:
useMaxForLimit
in classIngresDialect
- Returns:
- True if limit is relative from offset; false otherwise.
-
getLimitString
public java.lang.String getLimitString(java.lang.String querySelect, int offset, int limit)
Description copied from class:Dialect
Given a limit and an offset, apply the limit clause to the query.- Overrides:
getLimitString
in 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 query statement with the limit applied.
-
getIdentityColumnSupport
public IdentityColumnSupport getIdentityColumnSupport()
Description copied from class:Dialect
Get the appropriateIdentityColumnSupport
- Overrides:
getIdentityColumnSupport
in classDialect
- Returns:
- the IdentityColumnSupport
-
-