Package org.hibernate.dialect
Class IngresDialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.dialect.IngresDialect
- Direct Known Subclasses:
Ingres9Dialect
An SQL dialect for Ingres 9.2.
Known limitations:
- Only supports simple constants or columns on the left side of an IN, making (1,2,3) in (...) or (<subselect>) in (...) non-supported.
- Supports only 39 digits in decimal.
- Explicitly set USE_GET_GENERATED_KEYS property to false.
- Perform string casts to varchar; removes space padding.
-
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 TypeMethodDescriptionbooleanDo we need to drop constraints before dropping tables in this dialect?generateTemporaryTableName(String baseTableName) Generate a temporary table name given the base table.The syntax used to add a column to a table (optional).getCreateSequenceString(String sequenceName) The syntax used to create a sequence, if sequences are supported.Get any fragments needing to be postfixed to the command for temporary table creation.Command used to create a temporary table.Expression for current_timestampgetDropSequenceString(String sequenceName) The syntax used to drop a sequence, if sequences are supported.getLimitString(String querySelect, int offset, int limit) Add a LIMIT clause to the given SQL SELECTThe name of the SQL function that transforms a string to lowercaseThe keyword used to specify a nullable column.A query used to find all sequencesExpression for created UUID stringgetSelectSequenceNextValString(String sequenceName) Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.getSequenceNextValString(String sequenceName) The syntax that fetches the next value of a sequence, if sequences are supported.booleanDoes this dialect support empty IN lists?booleanExpected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...booleanDoes this dialect support FOR UPDATE OF, allowing particular rows to be locked?booleanDoes this Dialect have some kind of LIMIT syntax?booleanDoes this dialect support an offset?booleanIngres explicitly needs "unique not null", because "with null" is defaultbooleanDoes this dialect support sequences?booleanAre subselects supported as the left-hand-side (LHS) of IN-predicates.booleanDoes this dialect support temporary tables?booleanIngres does not support the syntax `count(distinct a,b)`?booleanDoes this dialect support bind variables (i.e., prepared statement 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.Dialect
addTypeOverride, appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropTemporaryTableAfterUse, forceLimitUsage, forUpdateOfColumns, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentTimestampSelectString, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getDropTemporaryTableString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLockingStrategy, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getReadLockString, getResultSet, getSelectClauseNullString, getTableComment, getTableTypeString, getTypeName, getTypeName, getTypeOverrides, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, isLockTimeoutParameterized, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLobValueChangePropogation, supportsLockTimeouts, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSubqueryOnMutatingTable, supportsTableCheck, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
-
Constructor Details
-
IngresDialect
public IngresDialect()
-
-
Method Details
-
getSelectGUIDString
Expression for created UUID string- Overrides:
getSelectGUIDStringin classDialect- Returns:
- The appropriate command.
-
dropConstraints
public boolean dropConstraints()Do we need to drop constraints before dropping tables in this dialect?- Overrides:
dropConstraintsin classDialect- Returns:
- boolean
-
supportsForUpdateOf
public boolean supportsForUpdateOf()Does this dialect support FOR UPDATE OF, allowing particular rows to be locked?- Returns:
- True (Ingres does support "for update of" syntax...)
-
getAddColumnString
The syntax used to add a column to a table (optional).- Overrides:
getAddColumnStringin classDialect- Returns:
- The "add column" fragment.
-
getNullColumnString
The keyword used to specify a nullable column.- Overrides:
getNullColumnStringin classDialect- Returns:
- String
-
supportsSequences
public boolean supportsSequences()Does this dialect support sequences?- Overrides:
supportsSequencesin classDialect- Returns:
- boolean
-
getSequenceNextValString
The syntax that fetches the next value of a sequence, if sequences are supported.- Overrides:
getSequenceNextValStringin classDialect- Parameters:
sequenceName- the name of the sequence- Returns:
- String
-
getSelectSequenceNextValString
Description copied from class:DialectGenerate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement. This differs fromDialect.getSequenceNextValString(String)in that this should return an expression usable within another statement.- Overrides:
getSelectSequenceNextValStringin classDialect- Parameters:
sequenceName- the name of the sequence- Returns:
- The "nextval" fragment.
-
getCreateSequenceString
The syntax used to create a sequence, if sequences are supported.- Overrides:
getCreateSequenceStringin classDialect- Parameters:
sequenceName- the name of the sequence- Returns:
- String
-
getDropSequenceString
The syntax used to drop a sequence, if sequences are supported.- Overrides:
getDropSequenceStringin classDialect- Parameters:
sequenceName- the name of the sequence- Returns:
- String
-
getQuerySequencesString
A query used to find all sequences- Overrides:
getQuerySequencesStringin classDialect- Returns:
- The select command; or null if sequences are not supported.
- See Also:
-
getLowercaseFunction
The name of the SQL function that transforms a string to lowercase- Overrides:
getLowercaseFunctionin classDialect- Returns:
- String
-
supportsLimit
public boolean supportsLimit()Does this Dialect have some kind of LIMIT syntax?- Overrides:
supportsLimitin classDialect- Returns:
- True if this dialect supports some form of LIMIT.
-
supportsLimitOffset
public boolean supportsLimitOffset()Does this dialect support an offset?- Overrides:
supportsLimitOffsetin classDialect- Returns:
- True if the dialect supports an offset within the limit support.
-
getLimitString
Add a LIMIT clause to the given SQL SELECT- Overrides:
getLimitStringin classDialect- 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
-
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 classDialect- Returns:
- True if bind variables can be used; false otherwise.
-
useMaxForLimit
public boolean useMaxForLimit()Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?- Overrides:
useMaxForLimitin classDialect- Returns:
- True if limit is relative from offset; false otherwise.
-
supportsNotNullUnique
public boolean supportsNotNullUnique()Ingres explicitly needs "unique not null", because "with null" is default- Overrides:
supportsNotNullUniquein classDialect
-
supportsTemporaryTables
public boolean supportsTemporaryTables()Does this dialect support temporary tables?- Overrides:
supportsTemporaryTablesin classDialect- Returns:
- True if temp tables are supported; false otherwise.
-
getCreateTemporaryTableString
Description copied from class:DialectCommand used to create a temporary table.- Overrides:
getCreateTemporaryTableStringin classDialect- Returns:
- The command used to create a temporary table.
-
getCreateTemporaryTablePostfix
Description copied from class:DialectGet any fragments needing to be postfixed to the command for temporary table creation.- Overrides:
getCreateTemporaryTablePostfixin classDialect- Returns:
- Any required postfix.
-
generateTemporaryTableName
Description copied from class:DialectGenerate a temporary table name given the base table.- Overrides:
generateTemporaryTableNamein classDialect- Parameters:
baseTableName- The table name from which to base the temp table name.- Returns:
- The generated temp table name.
-
getCurrentTimestampSQLFunctionName
Expression for current_timestamp- Overrides:
getCurrentTimestampSQLFunctionNamein classDialect- Returns:
- The function name.
-
supportsSubselectAsInPredicateLHS
public boolean supportsSubselectAsInPredicateLHS()Description copied from class:DialectAre subselects supported as the left-hand-side (LHS) of IN-predicates. In other words, is syntax like "...IN (1, 2, 3) ..." supported? - Overrides:
supportsSubselectAsInPredicateLHSin classDialect- Returns:
- True if subselects can appear as the LHS of an in-predicate; false otherwise.
-
supportsEmptyInList
public boolean supportsEmptyInList()Description copied from class:DialectDoes this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct?- Overrides:
supportsEmptyInListin classDialect- Returns:
- True if empty in lists are supported; false otherwise.
-
supportsExpectedLobUsagePattern
public boolean supportsExpectedLobUsagePattern()Description copied from class:DialectExpected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes... Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers...- Overrides:
supportsExpectedLobUsagePatternin classDialect- Returns:
- True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
-
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()Ingres does not support the syntax `count(distinct a,b)`?- Overrides:
supportsTupleDistinctCountsin classDialect- Returns:
- False, not supported.
-