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.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 concatenation 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, TWO_SINGLE_QUOTES_REPLACEMENT
-
-
Constructor Summary
Constructors Constructor Description Ingres9Dialect()Constructs a Ingres9Dialect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoesReadCommittedCauseWritersToBlockReaders()For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?booleandoesRepeatableReadCauseReadersToBlockWriters()For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?booleanforUpdateOfColumns()Is FOR UPDATE OF syntax supported?java.lang.StringgetCurrentTimestampSelectString()Retrieve the command used to retrieve the current timestamp from the database.java.lang.StringgetCurrentTimestampSQLFunctionName()The name of the database-specific SQL function for retrieving the current timestamp.LimitHandlergetDefaultLimitHandler()IdentityColumnSupportgetIdentityColumnSupport()Get the appropriateIdentityColumnSupportjava.lang.StringgetLimitString(java.lang.String querySelect, int offset, int limit)Given a limit and an offset, apply the limit clause to the query.java.lang.StringgetQuerySequencesString()Get the select command used retrieve the names of all sequences.booleanisCurrentTimestampSelectStringCallable()Should the value returned byDialect.getCurrentTimestampSelectString()be treated as callable.protected voidregisterDateTimeColumnTypes()Register column types date, time, timestampprotected voidregisterDateTimeFunctions()Register functions current_time, current_timestamp, current_datebooleansupportsCurrentTimestampSelection()Does this dialect support a way to retrieve the database's current timestamp value?booleansupportsLimitOffset()Does this dialect's LIMIT support (if any) additionally support specifying an offset?booleansupportsOuterJoinForUpdate()Does this dialect support FOR UPDATE in conjunction with outer joined rows?booleansupportsPooledSequences()Does this dialect support "pooled" sequences.booleansupportsUnionAll()Does this dialect support UNION ALL, which is generally a faster variant of UNION?booleansupportsVariableLimit()Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?booleanuseMaxForLimit()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, getSequenceInformationExtractor, getSequenceNextValString, supportsEmptyInList, supportsExpectedLobUsagePattern, supportsLimit, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTupleDistinctCounts
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentPhysicalTableTypes, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, 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, 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, supportsJdbcConnectionLobCreation, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, 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:DialectDoes 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()
Description copied from class:DialectIs FOR UPDATE OF syntax supported?- Overrides:
forUpdateOfColumnsin classDialect- Returns:
- True if the database supports FOR UPDATE OF syntax; false otherwise.
-
getQuerySequencesString
public java.lang.String getQuerySequencesString()
Description copied from class:DialectGet 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:
SchemaUpdate
-
supportsPooledSequences
public boolean supportsPooledSequences()
Description copied from class:DialectDoes 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:
Dialect.getCreateSequenceStrings(String, int, int),Dialect.getCreateSequenceString(String, int, int)
-
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()
Description copied from class:DialectShould the value returned byDialect.getCurrentTimestampSelectString()be treated as callable. Typically this indicates that JDBC escape syntax is being used...- Overrides:
isCurrentTimestampSelectStringCallablein classDialect- Returns:
- True if the
Dialect.getCurrentTimestampSelectString()return is callable; false otherwise.
-
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()
Description copied from class:DialectDoes 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
public java.lang.String getCurrentTimestampSelectString()
Description copied from class:DialectRetrieve the command used to retrieve the current timestamp from the database.- Overrides:
getCurrentTimestampSelectStringin classDialect- Returns:
- The command.
-
getCurrentTimestampSQLFunctionName
public java.lang.String getCurrentTimestampSQLFunctionName()
Description copied from class:DialectThe name of the database-specific SQL function for retrieving the current timestamp.- Overrides:
getCurrentTimestampSQLFunctionNamein classIngresDialect- Returns:
- The function name.
-
supportsUnionAll
public boolean supportsUnionAll()
Description copied from class:DialectDoes 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()
Description copied from class:DialectFor the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?- Overrides:
doesReadCommittedCauseWritersToBlockReadersin classDialect- Returns:
- True if writers block readers to achieve READ_COMMITTED; false otherwise.
-
doesRepeatableReadCauseReadersToBlockWriters
public boolean doesRepeatableReadCauseReadersToBlockWriters()
Description copied from class:DialectFor the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?- Overrides:
doesRepeatableReadCauseReadersToBlockWritersin classDialect- Returns:
- True if readers block writers to achieve REPEATABLE_READ; false otherwise.
-
getDefaultLimitHandler
public LimitHandler getDefaultLimitHandler()
- Overrides:
getDefaultLimitHandlerin classIngresDialect
-
supportsLimitOffset
public boolean supportsLimitOffset()
Description copied from class:DialectDoes this dialect's LIMIT support (if any) additionally support specifying an offset?- Overrides:
supportsLimitOffsetin classIngresDialect- Returns:
- True if the dialect supports an offset within the limit support.
-
supportsVariableLimit
public boolean supportsVariableLimit()
Description copied from class:DialectDoes this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?- Overrides:
supportsVariableLimitin classIngresDialect- Returns:
- True if bind variables can be used; false otherwise.
-
useMaxForLimit
public boolean useMaxForLimit()
Description copied from class:DialectDoes 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:
useMaxForLimitin 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:DialectGiven a limit and an offset, apply the limit clause to the query.- 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 query statement with the limit applied.
-
getIdentityColumnSupport
public IdentityColumnSupport getIdentityColumnSupport()
Description copied from class:DialectGet the appropriateIdentityColumnSupport- Overrides:
getIdentityColumnSupportin classDialect- Returns:
- the IdentityColumnSupport
-
-