Class MonetDbDialect

  • All Implemented Interfaces:
    Dialect

    public class MonetDbDialect
    extends JdbcDialectImpl
    Implementation of Dialect for the MonetDB database.
    Since:
    Nov 10, 2012
    Author:
    pstoellberger
    • Constructor Detail

      • MonetDbDialect

        public MonetDbDialect​(java.sql.Connection connection)
                       throws java.sql.SQLException
        Creates a MonetDbDialect.
        Parameters:
        connection - Connection
        Throws:
        java.sql.SQLException - on error
      • MonetDbDialect

        public MonetDbDialect()
    • Method Detail

      • allowsCountDistinct

        public boolean allowsCountDistinct()
        Description copied from interface: Dialect
        Returns whether this Dialect supports distinct aggregations.

        For example, Access does not allow

        select count(distinct x) from t
        Specified by:
        allowsCountDistinct in interface Dialect
        Overrides:
        allowsCountDistinct in class JdbcDialectImpl
        Returns:
        whether Dialect allows COUNT DISTINCT
      • 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
      • quoteStringLiteral

        public void quoteStringLiteral​(java.lang.StringBuilder buf,
                                       java.lang.String s)
        Description copied from interface: Dialect
        Appends to a buffer a single-quoted SQL string.

        For example, in the default dialect, quoteStringLiteral(buf, "Can't") appends "'Can''t'" to buf.

        Specified by:
        quoteStringLiteral in interface Dialect
        Overrides:
        quoteStringLiteral in class JdbcDialectImpl
        Parameters:
        buf - Buffer to append to
        s - Literal
      • getType

        public SqlStatement.Type getType​(java.sql.ResultSetMetaData metaData,
                                         int columnIndex)
                                  throws java.sql.SQLException
        Description copied from interface: Dialect

        Chooses the most appropriate type for accessing the values of a column in a result set for a dialect.

        Dialect-specific nuances involving type representation should be encapsulated in implementing methods. For example, if a dialect has implicit rules involving scale or precision, they should be handled within this method so the client can simply retrieve the "best fit" SqlStatement.Type for the column.

        Specified by:
        getType in interface Dialect
        Overrides:
        getType in class JdbcDialectImpl
        Parameters:
        metaData - Results set metadata
        columnIndex - Column ordinal (0-based)
        Returns:
        the most appropriate SqlStatement.Type for the column
        Throws:
        java.sql.SQLException