public class

IngresDialect

extends Dialect
java.lang.Object
   ↳ org.hibernate.dialect.Dialect
     ↳ org.hibernate.dialect.IngresDialect
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class org.hibernate.dialect.Dialect
Public Constructors
IngresDialect()
Public Methods
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?
[Expand]
Inherited Methods
From class org.hibernate.dialect.Dialect
From class java.lang.Object

Public Constructors

public IngresDialect ()

Public Methods

public boolean dropConstraints ()

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

Returns
  • boolean

public String generateTemporaryTableName (String baseTableName)

Generate a temporary table name given the base table.

Parameters
baseTableName The table name from which to base the temp table name.
Returns
  • The generated temp table name.

public String getAddColumnString ()

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

Returns
  • The "add column" fragment.

public String getCreateSequenceString (String sequenceName)

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

Parameters
sequenceName the name of the sequence
Returns
  • String

public String getCreateTemporaryTablePostfix ()

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

Returns
  • Any required postfix.

public String getCreateTemporaryTableString ()

Command used to create a temporary table.

Returns
  • The command used to create a temporary table.

public String getCurrentTimestampSQLFunctionName ()

Expression for current_timestamp

Returns
  • The function name.

public String getDropSequenceString (String sequenceName)

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

Parameters
sequenceName the name of the sequence
Returns
  • String

public String getLimitString (String querySelect, int offset, int limit)

Add a LIMIT clause to the given SQL SELECT

Parameters
querySelect The query to which to apply the limit.
offset The offset of the limit
limit The limit of the limit ;)
Returns
  • the modified SQL

public String getLowercaseFunction ()

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

Returns
  • String

public String getNullColumnString ()

The keyword used to specify a nullable column.

Returns
  • String

public String getQuerySequencesString ()

A query used to find all sequences

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

public String getSelectGUIDString ()

Expression for created UUID string

Returns
  • The appropriate command.

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

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

Parameters
sequenceName the name of the sequence
Returns
  • The "nextval" fragment.

public String getSequenceNextValString (String sequenceName)

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

Parameters
sequenceName the name of the sequence
Returns
  • String

public boolean supportsEmptyInList ()

Does this dialect support empty IN lists?

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

Returns
  • True if empty in lists are supported; false otherwise.

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

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
  • True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.

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

public boolean supportsLimit ()

Does this Dialect have some kind of LIMIT syntax?

Returns
  • True if this dialect supports some form of LIMIT.

public boolean supportsLimitOffset ()

Does this dialect support an offset?

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

public boolean supportsNotNullUnique ()

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

public boolean supportsSequences ()

Does this dialect support sequences?

Returns
  • boolean

public boolean 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
  • True if subselects can appear as the LHS of an in-predicate; false otherwise.

public boolean supportsTemporaryTables ()

Does this dialect support temporary tables?

Returns
  • True if temp tables are supported; false otherwise.

public boolean supportsTupleDistinctCounts ()

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

Returns
  • False, not supported.

public boolean supportsVariableLimit ()

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

Returns
  • True if bind variables can be used; false otherwise.

public boolean useMaxForLimit ()

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

Returns
  • True if limit is relative from offset; false otherwise.