Top Description Fields Constructors Methods
org.hibernate.dialect

public Class IngresDialect

extends Dialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.Ingres9Dialect
Imports
java.sql.Types, org.hibernate.cfg.Environment, org.hibernate.dialect.function.SQLFunctionTemplate, .NoArgSQLFunction, .StandardSQLFunction, .VarArgsSQLFunction, org.hibernate.type.StandardBasicTypes

An SQL dialect for Ingres 9.2.

Known limitations:

Authors
Ian Booth, Bruce Lunsford, Max Rydahl Andersen, Raymond Fan

Field Summary

Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTEDEFAULT_BATCH_SIZENO_BATCHQUOTE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

boolean
dropConstraints
()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

Do we need to drop constraints before dropping tables in this dialect?
public String
generateTemporaryTableName(String
The table name from which to base the temp table name.
baseTableName
)

Overrides org.hibernate.dialect.Dialect.generateTemporaryTableName.

Generate a temporary table name given the base table.
public String
getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).
public String

Returns:

String
getCreateSequenceString
(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

The syntax used to create a sequence, if sequences are supported.
public String
getCreateTemporaryTablePostfix()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

Get any fragments needing to be postfixed to the command for temporary table creation.
public String
public String
public String

Returns:

String
getDropSequenceString
(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

The syntax used to drop a sequence, if sequences are supported.
public String

Returns:

the modified SQL
getLimitString
(String
The query to which to apply the limit.
querySelect
,
int
The offset of the limit
offset
,
int
The limit of the limit ;)
limit
)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Add a LIMIT clause to the given SQL SELECT
public String

Returns:

String
getLowercaseFunction
()

Overrides org.hibernate.dialect.Dialect.getLowercaseFunction.

The name of the SQL function that transforms a string to lowercase
public String

Returns:

String
getNullColumnString
()

Overrides org.hibernate.dialect.Dialect.getNullColumnString.

The keyword used to specify a nullable column.
public String
public String
getSelectGUIDString()

Overrides org.hibernate.dialect.Dialect.getSelectGUIDString.

Expression for created UUID string
public String
getSelectSequenceNextValString(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.
public String

Returns:

String
getSequenceNextValString
(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

The syntax that fetches the next value of a sequence, if sequences are supported.
public boolean
supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?
public boolean
supportsExpectedLobUsagePattern()

Overrides org.hibernate.dialect.Dialect.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...
public boolean

Returns:

True (Ingres does support "for update of" syntax...)
supportsForUpdateOf
()

Does this dialect support FOR UPDATE OF, allowing particular rows to be locked?

public boolean
supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Does this Dialect have some kind of LIMIT syntax?
public boolean
supportsLimitOffset()

Overrides org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect support an offset?
public boolean
supportsNotNullUnique()

Overrides org.hibernate.dialect.Dialect.supportsNotNullUnique.

Ingres explicitly needs "unique not null", because "with null" is default
public boolean

Returns:

boolean
supportsSequences
()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?
public boolean
supportsSubselectAsInPredicateLHS()

Overrides org.hibernate.dialect.Dialect.supportsSubselectAsInPredicateLHS.

Are subselects supported as the left-hand-side (LHS) of IN-predicates.
public boolean
supportsTemporaryTables()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTables.

Does this dialect support temporary tables?
public boolean

Returns:

False, not supported.
supportsTupleDistinctCounts
()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Ingres does not support the syntax `count(distinct a,b)`?
public boolean
supportsVariableLimit()

Overrides org.hibernate.dialect.Dialect.supportsVariableLimit.

Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
public boolean
useMaxForLimit()

Overrides org.hibernate.dialect.Dialect.useMaxForLimit.

Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?
Inherited from org.hibernate.dialect.Dialect:
addTypeOverrideappendIdentitySelectToInsertappendLockHintapplyLocksToSqlareStringComparisonsCaseInsensitivebindLimitParametersFirstbindLimitParametersInReverseOrderbuildSQLExceptionConvertercloseQuoteconvertToFirstRowValuecreateCaseFragmentcreateOuterJoinFragmentdoesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersdropTemporaryTableAfterUseforceLimitUsageforUpdateOfColumnsgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetCascadeConstraintsStringgetCastTypeNamegetColumnAliasExtractorgetColumnCommentgetCreateMultisetTableStringgetCreateSequenceStringgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCrossJoinSeparatorgetCurrentTimestampSelectStringgetDefaultPropertiesgetDialectgetDialectgetDropForeignKeyStringgetDropSequenceStringsgetDropTemporaryTableStringgetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIdentityColumnStringgetIdentityColumnStringgetIdentityInsertStringgetIdentitySelectStringgetIdentitySelectStringgetKeywordsgetLimitStringgetLockingStrategygetMaxAliasLengthgetNativeIdentifierGeneratorClassgetNoColumnsInsertStringgetReadLockStringgetResultSetgetSelectClauseNullStringgetTableCommentgetTableTypeStringgetTypeNamegetTypeNamegetTypeOverridesgetViolatedConstraintNameExtractergetWriteLockStringhasAlterTablehasDataTypeInIdentityColumnhasSelfReferentialForeignKeyBugisCurrentTimestampSelectStringCallableisLockTimeoutParameterizedopenQuoteperformTemporaryTableDDLInIsolationqualifyIndexNamequoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordregisterResultSetOutParameterreplaceResultVariableInOrderByClauseWithPositionrequiresCastingOfParametersInSelectClausesupportsBindAsCallableArgumentsupportsCascadeDeletesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsExistsInSelectsupportsIdentityColumnssupportsIfExistsAfterTableNamesupportsIfExistsBeforeTableNamesupportsInsertSelectIdentitysupportsLobValueChangePropogationsupportsLockTimeoutssupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsPooledSequencessupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsRowValueConstructorSyntaxsupportsRowValueConstructorSyntaxInInListsupportsSubqueryOnMutatingTablesupportsTableChecksupportsTupleCountssupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUniquesupportsUniqueConstraintInCreateAlterTabletoBooleanValueStringtoStringtransformSelectStringuseInputStreamToInsertBlob

Constructor Detail

IngresDialectback to summary
public IngresDialect()

Method Detail

dropConstraintsback to summary
public boolean dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

Do we need to drop constraints before dropping tables in this dialect?

Returns:boolean

boolean

generateTemporaryTableNameback to summary
public String generateTemporaryTableName(String baseTableName)

Overrides org.hibernate.dialect.Dialect.generateTemporaryTableName.

Doc from org.hibernate.dialect.Dialect.generateTemporaryTableName.

Generate a temporary table name given the base table.

Parameters
baseTableName:String

The table name from which to base the temp table name.

Returns:String

The generated temp table name.

getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).

Returns:String

Doc from org.hibernate.dialect.Dialect.getAddColumnString.

The "add column" fragment.

getCreateSequenceStringback to summary
public String getCreateSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

The syntax used to create a sequence, if sequences are supported.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String

getCreateTemporaryTablePostfixback to summary
public String getCreateTemporaryTablePostfix()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

Doc from org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

Get any fragments needing to be postfixed to the command for temporary table creation.

Returns:String

Any required postfix.

getCreateTemporaryTableStringback to summary
public String getCreateTemporaryTableString()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTableString.

Doc from org.hibernate.dialect.Dialect.getCreateTemporaryTableString.

Command used to create a temporary table.

Returns:String

The command used to create a temporary table.

getCurrentTimestampSQLFunctionNameback to summary
public String getCurrentTimestampSQLFunctionName()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSQLFunctionName.

Expression for current_timestamp

Returns:String

Doc from org.hibernate.dialect.Dialect.getCurrentTimestampSQLFunctionName.

The function name.

getDropSequenceStringback to summary
public String getDropSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

The syntax used to drop a sequence, if sequences are supported.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String

getLimitStringback to summary
public String getLimitString(String querySelect, int offset, int limit)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Add a LIMIT clause to the given SQL SELECT

Parameters
querySelect:String

Doc from org.hibernate.dialect.Dialect.getLimitString.

The query to which to apply the limit.

offset:int

Doc from org.hibernate.dialect.Dialect.getLimitString.

The offset of the limit

limit:int

Doc from org.hibernate.dialect.Dialect.getLimitString.

The limit of the limit ;)

Returns:String

the modified SQL

getLowercaseFunctionback to summary
public String getLowercaseFunction()

Overrides org.hibernate.dialect.Dialect.getLowercaseFunction.

The name of the SQL function that transforms a string to lowercase

Returns:String

String

getNullColumnStringback to summary
public String getNullColumnString()

Overrides org.hibernate.dialect.Dialect.getNullColumnString.

The keyword used to specify a nullable column.

Returns:String

String

getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

A query used to find all sequences

Returns:String

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

The select command; or null if sequences are not supported.

getSelectGUIDStringback to summary
public String getSelectGUIDString()

Overrides org.hibernate.dialect.Dialect.getSelectGUIDString.

Expression for created UUID string

Returns:String

Doc from org.hibernate.dialect.Dialect.getSelectGUIDString.

The appropriate command.

getSelectSequenceNextValStringback to summary
public String getSelectSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Doc from org.hibernate.dialect.Dialect.getSelectSequenceNextValString.

Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.

This differs from getSequenceNextValString(String) in that this should return an expression usable within another statement.

Parameters
sequenceName:String

the name of the sequence

Returns:String

The "nextval" fragment.

getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

The syntax that fetches the next value of a sequence, if sequences are supported.

Parameters
sequenceName:String

the name of the sequence

Returns:String

String

supportsEmptyInListback to summary
public boolean supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Doc from org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?

For example, is [where XYZ in ()] a supported construct?

Returns:boolean

True if empty in lists are supported; false otherwise.

supportsExpectedLobUsagePatternback to summary
public boolean supportsExpectedLobUsagePattern()

Overrides org.hibernate.dialect.Dialect.supportsExpectedLobUsagePattern.

Doc from org.hibernate.dialect.Dialect.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...

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...

Returns:boolean

True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.

supportsForUpdateOfback to summary
public boolean supportsForUpdateOf()

Does this dialect support FOR UPDATE OF, allowing particular rows to be locked?

Returns:boolean

True (Ingres does support "for update of" syntax...)

supportsLimitback to summary
public boolean supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Does this Dialect have some kind of LIMIT syntax?

Returns:boolean

Doc from org.hibernate.dialect.Dialect.supportsLimit.

True if this dialect supports some form of LIMIT.

supportsLimitOffsetback to summary
public boolean supportsLimitOffset()

Overrides org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect support an offset?

Returns:boolean

Doc from org.hibernate.dialect.Dialect.supportsLimitOffset.

True if the dialect supports an offset within the limit support.

supportsNotNullUniqueback to summary
public boolean supportsNotNullUnique()

Overrides org.hibernate.dialect.Dialect.supportsNotNullUnique.

Ingres explicitly needs "unique not null", because "with null" is default

supportsSequencesback to summary
public boolean supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?

Returns:boolean

boolean

supportsSubselectAsInPredicateLHSback to summary
public boolean supportsSubselectAsInPredicateLHS()

Overrides org.hibernate.dialect.Dialect.supportsSubselectAsInPredicateLHS.

Doc from org.hibernate.dialect.Dialect.supportsSubselectAsInPredicateLHS.

Are subselects supported as the left-hand-side (LHS) of IN-predicates.

In other words, is syntax like "... IN (1, 2, 3) ..." supported?

Returns:boolean

True if subselects can appear as the LHS of an in-predicate; false otherwise.

supportsTemporaryTablesback to summary
public boolean supportsTemporaryTables()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTables.

Does this dialect support temporary tables?

Returns:boolean

Doc from org.hibernate.dialect.Dialect.supportsTemporaryTables.

True if temp tables are supported; false otherwise.

supportsTupleDistinctCountsback to summary
public boolean supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Ingres does not support the syntax `count(distinct a,b)`?

Returns:boolean

False, not supported.

supportsVariableLimitback to summary
public boolean supportsVariableLimit()

Overrides org.hibernate.dialect.Dialect.supportsVariableLimit.

Doc from org.hibernate.dialect.Dialect.supportsVariableLimit.

Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?

Returns:boolean

True if bind variables can be used; false otherwise.

useMaxForLimitback to summary
public boolean useMaxForLimit()

Overrides org.hibernate.dialect.Dialect.useMaxForLimit.

Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?

Returns:boolean

Doc from org.hibernate.dialect.Dialect.useMaxForLimit.

True if limit is relative from offset; false otherwise.