Class InformixDialect

  • All Implemented Interfaces:
    Dialect

    public class InformixDialect
    extends JdbcDialectImpl
    Implementation of Dialect for the Informix database.
    Since:
    Nov 23, 2008
    Author:
    jhyde
    • Constructor Detail

      • InformixDialect

        public InformixDialect​(Connection connection)
                        throws SQLException
        Creates an InformixDialect.
        Parameters:
        connection - Connection
        Throws:
        SQLException
    • Method Detail

      • generateOrderByNulls

        public String generateOrderByNulls​(String expr,
                                           boolean ascending,
                                           boolean collateNullsLast)
        Description copied from class: JdbcDialectImpl
        Generates SQL to force null values to collate last.

        This default implementation makes use of the ANSI SQL 1999 CASE-WHEN-THEN-ELSE in conjunction with IS NULL syntax. The resulting SQL will look something like this:

        CASE WHEN "expr" IS NULL THEN 0 ELSE 1 END

        You can override this method for a particular database to use something more efficient, like ISNULL().

        ANSI SQL provides the syntax "ASC/DESC NULLS LAST" and "ASC/DESC NULLS FIRST". If your database supports the ANSI syntax, implement this method by calling JdbcDialectImpl.generateOrderByNullsAnsi(java.lang.String, boolean, boolean).

        This method is only called from JdbcDialectImpl.generateOrderItem(String, boolean, boolean, boolean). Some dialects override that method and therefore never call this method.

        Overrides:
        generateOrderByNulls in class JdbcDialectImpl
        Parameters:
        expr - Expression.
        ascending - Whether ascending.
        collateNullsLast - Whether nulls should appear first or last.
        Returns:
        Expression to force null values to collate last or first.
      • supportsGroupByExpressions

        public boolean supportsGroupByExpressions()
        Description copied from interface: Dialect
        Returns whether this Dialect supports expressions in the GROUP BY clause. Derby/Cloudscape and Infobright do not.
        Specified by:
        supportsGroupByExpressions in interface Dialect
        Overrides:
        supportsGroupByExpressions in class JdbcDialectImpl
        Returns:
        Whether this Dialect allows expressions in the GROUP BY clause