Package mondrian.spi.impl
Class NuoDbDialect
java.lang.Object
mondrian.spi.impl.JdbcDialectImpl
mondrian.spi.impl.NuoDbDialect
- All Implemented Interfaces:
Dialect
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface mondrian.spi.Dialect
Dialect.DatabaseProduct, Dialect.Datatype
-
Field Summary
Fields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
deduceIdentifierQuoteString
(DatabaseMetaData databaseMetaData) The NuoDB JDBC driver lists " " as the string to use for quoting, but we know better.In order to generate a SQL statement to represent an inline dataset NuoDB requires that you use FROM DUAL.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.Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresAliasForFromQuery, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpper
-
Field Details
-
FACTORY
-
-
Constructor Details
-
NuoDbDialect
Creates a NuoDbDialect.- Parameters:
connection
- Connection- Throws:
SQLException
-
-
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 interfaceDialect
- Overrides:
generateInline
in classJdbcDialectImpl
- Parameters:
columnNames
- the list of column namescolumnTypes
- the list of column typesvalueList
- the value list- Returns:
- the generated SQL statement for an inline dataset
-
quoteDateLiteral
NuoDB does not yet support ANSI SQL:2003 for DATE literals so we have to cast dates using a function.- Overrides:
quoteDateLiteral
in classJdbcDialectImpl
- Parameters:
buf
- Buffer to append tovalue
- Value as stringdate
- Value as date
-
deduceIdentifierQuoteString
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 classJdbcDialectImpl
- Parameters:
databaseMetaData
- the database metadata from the connection- Returns:
- the quotation character
-