Class NuoDbDialect

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

public class NuoDbDialect extends JdbcDialectImpl
Implementation of Dialect for the NuoDB database. In order to use NuoDB with Hitachi Vantara Mondrian users can only use NuoDB version 2.0.4 or newer.
Since:
Mar 20, 2014
Author:
rbuck
  • Field Details

  • Constructor Details

  • Method Details

    • generateInline

      public String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
      In order to generate a SQL statement to represent an inline dataset NuoDB requires that you use FROM DUAL.
      Specified by:
      generateInline in interface Dialect
      Overrides:
      generateInline in class JdbcDialectImpl
      Parameters:
      columnNames - the list of column names
      columnTypes - the list of column types
      valueList - the value list
      Returns:
      the generated SQL statement for an inline dataset
    • quoteDateLiteral

      protected void quoteDateLiteral(StringBuilder buf, String value, Date date)
      NuoDB does not yet support ANSI SQL:2003 for DATE literals so we have to cast dates using a function.
      Overrides:
      quoteDateLiteral in class JdbcDialectImpl
      Parameters:
      buf - Buffer to append to
      value - Value as string
      date - Value as date
    • deduceIdentifierQuoteString

      protected String deduceIdentifierQuoteString(DatabaseMetaData databaseMetaData)
      The NuoDB JDBC driver lists " " as the string to use for quoting, but we know better. Ideally the quotation character ought to have been "`" but if that is used and a generated query uses non quoted object names, not- found exceptions will occur for the object. So we here fall back to using the double quote character. We ought to investigate why back-tick won't work. But for now this makes all the tests work with Nuo (besides the tweaks above).
      Overrides:
      deduceIdentifierQuoteString in class JdbcDialectImpl
      Parameters:
      databaseMetaData - the database metadata from the connection
      Returns:
      the quotation character