Class DerbyDialect

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

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

  • Constructor Details

  • Method Details

    • quoteDateLiteral

      protected void quoteDateLiteral(StringBuilder buf, String value, Date date)
      Description copied from class: JdbcDialectImpl
      Overrides:
      quoteDateLiteral in class JdbcDialectImpl
      Parameters:
      buf - Buffer to append to
      value - Value as string
      date - Value as date
    • requiresAliasForFromQuery

      public boolean requiresAliasForFromQuery()
      Description copied from interface: Dialect
      Returns whether this Dialect requires subqueries in the FROM clause to have an alias.
      Specified by:
      requiresAliasForFromQuery in interface Dialect
      Overrides:
      requiresAliasForFromQuery in class JdbcDialectImpl
      Returns:
      whether dialewct requires subqueries to have an alias
      See Also:
    • allowsMultipleCountDistinct

      public boolean allowsMultipleCountDistinct()
      Description copied from interface: Dialect
      Returns whether this Dialect supports more than one distinct aggregation in the same query.

      In Derby 10.1,

      select couunt(distinct x) from t
      is OK, but
      select couunt(distinct x), count(distinct y) from t
      gives "Multiple DISTINCT aggregates are not supported at this time."
      Specified by:
      allowsMultipleCountDistinct in interface Dialect
      Overrides:
      allowsMultipleCountDistinct in class JdbcDialectImpl
      Returns:
      whether this Dialect supports more than one distinct aggregation in the same query
    • generateInline

      public String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
      Description copied from interface: Dialect
      Generates a SQL statement to represent an inline dataset.

      For example, for Oracle, generates

       SELECT 1 AS FOO, 'a' AS BAR FROM dual
       UNION ALL
       SELECT 2 AS FOO, 'b' AS BAR FROM dual
       

      For ANSI SQL, generates:

       VALUES (1, 'a'), (2, 'b')
       
      Specified by:
      generateInline in interface Dialect
      Overrides:
      generateInline in class JdbcDialectImpl
      Parameters:
      columnNames - List of column names
      columnTypes - List of column types ("String" or "Numeric")
      valueList - List of rows values
      Returns:
      SQL string
    • 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