Class DerbyDialect

  • All Implemented Interfaces:
    Dialect

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

    • Method Detail

      • 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