org.hibernate.dialect
Class IngresDialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.dialect.IngresDialect
- All Implemented Interfaces:
- ConversionContext
- Direct Known Subclasses:
- Ingres9Dialect
public class IngresDialect
- extends Dialect
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.
Method Summary |
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect? |
String |
generateTemporaryTableName(String baseTableName)
Generate a temporary table name given the base table. |
String |
getAddColumnString()
The syntax used to add a column to a table (optional). |
String |
getCreateSequenceString(String sequenceName)
The syntax used to create a sequence, if sequences are supported. |
String |
getCreateTemporaryTablePostfix()
Get any fragments needing to be postfixed to the command for
temporary table creation. |
String |
getCreateTemporaryTableString()
Command used to create a temporary table. |
String |
getCurrentTimestampSQLFunctionName()
Expression for current_timestamp |
String |
getDropSequenceString(String sequenceName)
The syntax used to drop a sequence, if sequences are supported. |
String |
getLimitString(String querySelect,
int offset,
int limit)
Add a LIMIT clause to the given SQL SELECT |
String |
getLowercaseFunction()
The name of the SQL function that transforms a string to
lowercase |
String |
getNullColumnString()
The keyword used to specify a nullable column. |
String |
getQuerySequencesString()
A query used to find all sequences |
String |
getSelectGUIDString()
Expression for created UUID string |
String |
getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement. |
String |
getSequenceNextValString(String sequenceName)
The syntax that fetches the next value of a sequence, if sequences are supported. |
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct? |
boolean |
supportsExpectedLobUsagePattern()
Expected 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... |
boolean |
supportsForUpdateOf()
Does this dialect support FOR UPDATE OF, allowing
particular rows to be locked? |
boolean |
supportsLimit()
Does this Dialect have some kind of LIMIT syntax? |
boolean |
supportsLimitOffset()
Does this dialect support an offset? |
boolean |
supportsNotNullUnique()
Ingres explicitly needs "unique not null", because "with null" is default |
boolean |
supportsSequences()
Does this dialect support sequences? |
boolean |
supportsSubselectAsInPredicateLHS()
Are subselects supported as the left-hand-side (LHS) of
IN-predicates. |
boolean |
supportsTemporaryTables()
Does this dialect support temporary tables? |
boolean |
supportsTupleDistinctCounts()
Ingres does not support the syntax `count(distinct a,b)`? |
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.Dialect |
appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropTemporaryTableAfterUse, forceLimitUsage, forUpdateOfColumns, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getCascadeConstraintsString, getCaseInsensitiveLike, 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, getLobMergeStrategy, getLockingStrategy, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getReadLockString, getResultSet, getSelectClauseNullString, getSqlTypeDescriptorOverride, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, isLockTimeoutParameterized, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, 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 |
IngresDialect
public IngresDialect()
getSelectGUIDString
public String getSelectGUIDString()
- Expression for created UUID string
- Overrides:
getSelectGUIDString
in class Dialect
- Returns:
- The appropriate command.
dropConstraints
public boolean dropConstraints()
- Do we need to drop constraints before dropping tables in this dialect?
- Overrides:
dropConstraints
in class Dialect
- 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
public String getAddColumnString()
- The syntax used to add a column to a table (optional).
- Overrides:
getAddColumnString
in class Dialect
- Returns:
- The "add column" fragment.
getNullColumnString
public String getNullColumnString()
- The keyword used to specify a nullable column.
- Overrides:
getNullColumnString
in class Dialect
- Returns:
- String
supportsSequences
public boolean supportsSequences()
- Does this dialect support sequences?
- Overrides:
supportsSequences
in class Dialect
- Returns:
- boolean
getSequenceNextValString
public String getSequenceNextValString(String sequenceName)
- The syntax that fetches the next value of a sequence, if sequences are supported.
- Overrides:
getSequenceNextValString
in class Dialect
- Parameters:
sequenceName
- the name of the sequence
- Returns:
- String
getSelectSequenceNextValString
public String getSelectSequenceNextValString(String sequenceName)
- Description copied from class:
Dialect
- Generate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement.
This differs from
Dialect.getSequenceNextValString(String)
in that this
should return an expression usable within another statement.
- Overrides:
getSelectSequenceNextValString
in class Dialect
- Parameters:
sequenceName
- the name of the sequence
- Returns:
- The "nextval" fragment.
getCreateSequenceString
public String getCreateSequenceString(String sequenceName)
- The syntax used to create a sequence, if sequences are supported.
- Overrides:
getCreateSequenceString
in class Dialect
- Parameters:
sequenceName
- the name of the sequence
- Returns:
- String
getDropSequenceString
public String getDropSequenceString(String sequenceName)
- The syntax used to drop a sequence, if sequences are supported.
- Overrides:
getDropSequenceString
in class Dialect
- Parameters:
sequenceName
- the name of the sequence
- Returns:
- String
getQuerySequencesString
public String getQuerySequencesString()
- A query used to find all sequences
- Overrides:
getQuerySequencesString
in class Dialect
- Returns:
- The select command; or null if sequences are not supported.
- See Also:
SchemaUpdate
getLowercaseFunction
public String getLowercaseFunction()
- The name of the SQL function that transforms a string to
lowercase
- Overrides:
getLowercaseFunction
in class Dialect
- Returns:
- String
supportsLimit
public boolean supportsLimit()
- Does this Dialect have some kind of LIMIT syntax?
- Overrides:
supportsLimit
in class Dialect
- Returns:
- True if this dialect supports some form of LIMIT.
supportsLimitOffset
public boolean supportsLimitOffset()
- Does this dialect support an offset?
- Overrides:
supportsLimitOffset
in class Dialect
- Returns:
- True if the dialect supports an offset within the limit support.
getLimitString
public String getLimitString(String querySelect,
int offset,
int limit)
- Add a LIMIT clause to the given SQL SELECT
- Overrides:
getLimitString
in class Dialect
- 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:
Dialect
- Does this dialect support bind variables (i.e., prepared statement
parameters) for its limit/offset?
- Overrides:
supportsVariableLimit
in class Dialect
- 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:
useMaxForLimit
in class Dialect
- 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:
supportsNotNullUnique
in class Dialect
supportsTemporaryTables
public boolean supportsTemporaryTables()
- Does this dialect support temporary tables?
- Overrides:
supportsTemporaryTables
in class Dialect
- Returns:
- True if temp tables are supported; false otherwise.
getCreateTemporaryTableString
public String getCreateTemporaryTableString()
- Description copied from class:
Dialect
- Command used to create a temporary table.
- Overrides:
getCreateTemporaryTableString
in class Dialect
- Returns:
- The command used to create a temporary table.
getCreateTemporaryTablePostfix
public String getCreateTemporaryTablePostfix()
- Description copied from class:
Dialect
- Get any fragments needing to be postfixed to the command for
temporary table creation.
- Overrides:
getCreateTemporaryTablePostfix
in class Dialect
- Returns:
- Any required postfix.
generateTemporaryTableName
public String generateTemporaryTableName(String baseTableName)
- Description copied from class:
Dialect
- Generate a temporary table name given the base table.
- Overrides:
generateTemporaryTableName
in class Dialect
- Parameters:
baseTableName
- The table name from which to base the temp table name.
- Returns:
- The generated temp table name.
getCurrentTimestampSQLFunctionName
public String getCurrentTimestampSQLFunctionName()
- Expression for current_timestamp
- Overrides:
getCurrentTimestampSQLFunctionName
in class Dialect
- Returns:
- The function name.
supportsSubselectAsInPredicateLHS
public boolean supportsSubselectAsInPredicateLHS()
- Description copied from class:
Dialect
- Are subselects supported as the left-hand-side (LHS) of
IN-predicates.
In other words, is syntax like "... IN (1, 2, 3) ..." supported?
- Overrides:
supportsSubselectAsInPredicateLHS
in class Dialect
- Returns:
- True if subselects can appear as the LHS of an in-predicate;
false otherwise.
supportsEmptyInList
public boolean supportsEmptyInList()
- Description copied from class:
Dialect
- Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
- Overrides:
supportsEmptyInList
in class Dialect
- Returns:
- True if empty in lists are supported; false otherwise.
supportsExpectedLobUsagePattern
public boolean supportsExpectedLobUsagePattern()
- Description copied from class:
Dialect
- Expected 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:
supportsExpectedLobUsagePattern
in class Dialect
- 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:
supportsTupleDistinctCounts
in class Dialect
- Returns:
- False, not supported.
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.