Class Ingres9Dialect

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public class Ingres9Dialect
    extends IngresDialect
    A SQL dialect for Ingres 9.3 and later versions.


    • Support for the SQL functions current_time, current_timestamp and current_date added
    • Type mapping of Types.TIMESTAMP changed 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 concatination operator
    • Constructor Detail

      • Ingres9Dialect

        public Ingres9Dialect()
        Constructs a Ingres9Dialect
    • 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: Dialect
        Does this dialect support FOR UPDATE in conjunction with outer joined rows?
        supportsOuterJoinForUpdate in class Dialect
        True if outer joined rows can be locked via FOR UPDATE.
      • forUpdateOfColumns

        public boolean forUpdateOfColumns()
        Description copied from class: Dialect
        Is FOR UPDATE OF syntax supported?
        forUpdateOfColumns in class Dialect
        True if the database supports FOR UPDATE OF syntax; false otherwise.
      • getQuerySequencesString

        public java.lang.String getQuerySequencesString()
        Description copied from class: Dialect
        Get the select command used retrieve the names of all sequences.
        getQuerySequencesString in class IngresDialect
        The select command; or null if sequences are not supported.
        See Also:
      • supportsCurrentTimestampSelection

        public boolean supportsCurrentTimestampSelection()
        Description copied from class: Dialect
        Does this dialect support a way to retrieve the database's current timestamp value?
        supportsCurrentTimestampSelection in class Dialect
        True if the current timestamp can be retrieved; false otherwise.
      • getCurrentTimestampSelectString

        public java.lang.String getCurrentTimestampSelectString()
        Description copied from class: Dialect
        Retrieve the command used to retrieve the current timestamp from the database.
        getCurrentTimestampSelectString in class Dialect
        The command.
      • getCurrentTimestampSQLFunctionName

        public java.lang.String getCurrentTimestampSQLFunctionName()
        Description copied from class: Dialect
        The name of the database-specific SQL function for retrieving the current timestamp.
        getCurrentTimestampSQLFunctionName in class IngresDialect
        The function name.
      • supportsUnionAll

        public boolean supportsUnionAll()
        Description copied from class: Dialect
        Does this dialect support UNION ALL, which is generally a faster variant of UNION?
        supportsUnionAll in class Dialect
        True if UNION ALL is supported; false otherwise.
      • doesReadCommittedCauseWritersToBlockReaders

        public boolean doesReadCommittedCauseWritersToBlockReaders()
        Description copied from class: Dialect
        For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
        doesReadCommittedCauseWritersToBlockReaders in class Dialect
        True if writers block readers to achieve READ_COMMITTED; false otherwise.
      • doesRepeatableReadCauseReadersToBlockWriters

        public boolean doesRepeatableReadCauseReadersToBlockWriters()
        Description copied from class: Dialect
        For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
        doesRepeatableReadCauseReadersToBlockWriters in class Dialect
        True if readers block writers to achieve REPEATABLE_READ; false otherwise.
      • supportsLimitOffset

        public boolean supportsLimitOffset()
        Description copied from class: Dialect
        Does this dialect's LIMIT support (if any) additionally support specifying an offset?
        supportsLimitOffset in class IngresDialect
        True if the dialect supports an offset within the limit support.
      • supportsVariableLimit

        public boolean supportsVariableLimit()
        Description copied from class: Dialect
        Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
        supportsVariableLimit in class IngresDialect
        True if bind variables can be used; false otherwise.
      • useMaxForLimit

        public boolean useMaxForLimit()
        Description copied from class: Dialect
        Does 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?

        useMaxForLimit in class IngresDialect
        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: Dialect
        Given a limit and an offset, apply the limit clause to the query.
        getLimitString in class IngresDialect
        querySelect - The query to which to apply the limit.
        offset - The offset of the limit
        limit - The limit of the limit ;)
        The modified query statement with the limit applied.