Class InformixDialect

java.lang.Object
mondrian.spi.impl.JdbcDialectImpl
mondrian.spi.impl.InformixDialect
All Implemented Interfaces:
Dialect

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

  • Constructor Details

    • InformixDialect

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

    • allowsFromQuery

      public boolean allowsFromQuery()
      Description copied from interface: Dialect
      Returns whether this Dialect allows a subquery in the from clause, for example
      SELECT * FROM (SELECT * FROM t) AS x
      Specified by:
      allowsFromQuery in interface Dialect
      Overrides:
      allowsFromQuery in class JdbcDialectImpl
      Returns:
      whether Dialect allows subquery in FROM clause
      See Also:
    • 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