mondrian.spi.impl
Class NeoviewDialect

java.lang.Object
  extended by mondrian.spi.impl.JdbcDialectImpl
      extended by mondrian.spi.impl.NeoviewDialect
All Implemented Interfaces:
Dialect

public class NeoviewDialect
extends JdbcDialectImpl

Implementation of Dialect for the Neoview database.

Since:
Dec 4, 2009
Author:
jhyde

Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.spi.Dialect
Dialect.DatabaseProduct, Dialect.Datatype
 
Field Summary
static JdbcDialectFactory FACTORY
           
 
Fields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion
 
Constructor Summary
NeoviewDialect(Connection connection)
          Creates a NeoviewDialect.
 
Method Summary
 boolean _supportsOrderByNullsLast()
           
 boolean allowsDdl()
          Returns whether this dialect supports common SQL Data Definition Language (DDL) statements such as CREATE TABLE and DROP INDEX.
 String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
          Generates a SQL statement to represent an inline dataset.
 boolean requiresAliasForFromQuery()
          Returns whether this Dialect requires subqueries in the FROM clause to have an alias.
 boolean requiresOrderByAlias()
          Returns true if this Dialect can include expressions in the ORDER BY clause only by adding an expression to the SELECT clause and using its alias.
 boolean supportsGroupByExpressions()
          Returns whether this Dialect supports expressions in the GROUP BY clause.
 
Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FACTORY

public static final JdbcDialectFactory FACTORY
Constructor Detail

NeoviewDialect

public NeoviewDialect(Connection connection)
               throws SQLException
Creates a NeoviewDialect.

Parameters:
connection - Connection
Throws:
SQLException
Method Detail

_supportsOrderByNullsLast

public boolean _supportsOrderByNullsLast()

requiresOrderByAlias

public boolean requiresOrderByAlias()
Description copied from interface: Dialect
Returns true if this Dialect can include expressions in the ORDER BY clause only by adding an expression to the SELECT clause and using its alias.

For example, in such a dialect,

SELECT x FROM t ORDER BY x + y
would be illegal, but
SELECT x, x + y AS z FROM t ORDER BY z
would be legal.

MySQL, DB2 and Ingres are examples of such dialects.

Specified by:
requiresOrderByAlias in interface Dialect
Overrides:
requiresOrderByAlias in class JdbcDialectImpl
Returns:
Whether this Dialect can include expressions in the ORDER BY clause only by adding an expression to the SELECT clause and using its alias

requiresAliasForFromQuery

public boolean requiresAliasForFromQuery()
Description copied from interface: Dialect
Returns whether this Dialect requires subqueries in the FROM clause to have an alias.

Specified by:
requiresAliasForFromQuery in interface Dialect
Overrides:
requiresAliasForFromQuery in class JdbcDialectImpl
Returns:
whether dialewct requires subqueries to have an alias
See Also:
Dialect.allowsFromQuery()

allowsDdl

public boolean allowsDdl()
Description copied from interface: Dialect
Returns whether this dialect supports common SQL Data Definition Language (DDL) statements such as CREATE TABLE and DROP INDEX.

Access seems to allow DDL iff the .mdb file is writeable.

Specified by:
allowsDdl in interface Dialect
Overrides:
allowsDdl in class JdbcDialectImpl
Returns:
whether this Dialect supports DDL
See Also:
DatabaseMetaData.isReadOnly()

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

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

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads