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
FieldsFields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdeduceIdentifierQuoteString(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 voidquoteDateLiteral(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:
generateInlinein interfaceDialect- Overrides:
generateInlinein 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:
quoteDateLiteralin 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:
deduceIdentifierQuoteStringin classJdbcDialectImpl- Parameters:
databaseMetaData- the database metadata from the connection- Returns:
- the quotation character
-