mondrian.spi.impl
Class OracleDialect

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

public class OracleDialect
extends JdbcDialectImpl

Implementation of Dialect for the Oracle database.

Since:
Nov 23, 2008
Version:
$Id: //open/mondrian/src/main/mondrian/spi/impl/OracleDialect.java#4 $
Author:
jhyde

Nested Class Summary
 
Nested classes/interfaces inherited from interface mondrian.spi.Dialect
Dialect.DatabaseProduct, Dialect.Datatype, Dialect.NullCollation
 
Field Summary
static JdbcDialectFactory FACTORY
           
 
Fields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion
 
Constructor Summary
OracleDialect(Connection connection)
          Creates an OracleDialect.
 
Method Summary
 boolean allowsAs()
          Returns whether the SQL dialect allows "AS" in the FROM clause.
 String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
          Generates a SQL statement to represent an inline dataset.
 boolean supportsGroupingSets()
          Returns whether this Dialect allows the GROUPING SETS construct in the GROUP BY clause.
 boolean supportsOrderByNullsLast()
          Returns whether this dialect supports "ASC NULLS LAST" and "DESC NULLS LAST" applied to an item in the ORDER BY clause.
 
Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsCompoundCountDistinct, allowsCountDistinct, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, generateInlineForAnsi, generateInlineGeneric, generateOrderItem, getDatabaseProduct, getMaxColumnNameLength, getNullCollation, getProduct, getQuoteIdentifierString, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, requiresAliasForFromQuery, requiresGroupByAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, 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

OracleDialect

public OracleDialect(Connection connection)
              throws SQLException
Creates an OracleDialect.

Parameters:
connection - Connection
Throws:
SQLException
Method Detail

allowsAs

public boolean allowsAs()
Description copied from interface: Dialect
Returns whether the SQL dialect allows "AS" in the FROM clause. If so, "SELECT * FROM t AS alias" is a valid query.

Specified by:
allowsAs in interface Dialect
Overrides:
allowsAs in class JdbcDialectImpl
Returns:
whether dialect allows AS in FROM 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

supportsGroupingSets

public boolean supportsGroupingSets()
Description copied from interface: Dialect
Returns whether this Dialect allows the GROUPING SETS construct in the GROUP BY clause. Currently Oracle, DB2 and Teradata.

Specified by:
supportsGroupingSets in interface Dialect
Overrides:
supportsGroupingSets in class JdbcDialectImpl
Returns:
Whether this Dialect allows GROUPING SETS clause

supportsOrderByNullsLast

public boolean supportsOrderByNullsLast()
Description copied from class: JdbcDialectImpl
Returns whether this dialect supports "ASC NULLS LAST" and "DESC NULLS LAST" applied to an item in the ORDER BY clause.

This feature is in standard SQL but is not supported by many databases, therefore the default implementation returns false.

This method is only called from JdbcDialectImpl.generateOrderItem(String, boolean, boolean). Some dialects override that method and therefore never call this method.

Overrides:
supportsOrderByNullsLast in class JdbcDialectImpl
Returns:
Whether this dialect supports "ORDER BY ... NULLS LAST".

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