mondrian.spi.impl
Class VerticaDialect

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

public class VerticaDialect
extends JdbcDialectImpl

Implementation of Dialect for the Vertica database.

Since:
Sept 11, 2009
Author:
Pedro Alves

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
VerticaDialect(Connection connection)
          Creates a VerticaDialect.
 
Method Summary
 boolean allowsCountDistinct()
          Returns whether this Dialect supports distinct aggregations.
 boolean allowsFromQuery()
          Returns whether this Dialect allows a subquery in the from clause, for example SELECT * FROM (SELECT * FROM t) AS x
 String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
          Generates a SQL statement to represent an inline dataset.
 Dialect.DatabaseProduct getDatabaseProduct()
          Returns the database for this Dialect, or Dialect.DatabaseProduct.UNKNOWN if the database is not a common database.
 boolean requiresAliasForFromQuery()
          Returns whether this Dialect requires subqueries in the FROM clause to have an alias.
 boolean supportsResultSetConcurrency(int type, int concurrency)
          Returns whether this Dialect supports the given concurrency type in combination with the given result set type.
 
Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsAs, allowsCompoundCountDistinct, allowsDdl, allowsDialectSharing, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateOrderItem, generateRegularExpression, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, 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

VerticaDialect

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

Parameters:
connection - Connection
Throws:
SQLException
Method Detail

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()

allowsFromQuery

public boolean allowsFromQuery()
Description copied from interface: Dialect
Returns whether this Dialect allows a subquery in the from clause, for example
SELECT * FROM (SELECT * FROM t) AS x

Specified by:
allowsFromQuery in interface Dialect
Overrides:
allowsFromQuery in class JdbcDialectImpl
Returns:
whether Dialect allows subquery in FROM clause
See Also:
Dialect.requiresAliasForFromQuery()

allowsCountDistinct

public boolean allowsCountDistinct()
Description copied from interface: Dialect
Returns whether this Dialect supports distinct aggregations.

For example, Access does not allow

select count(distinct x) from t

Specified by:
allowsCountDistinct in interface Dialect
Overrides:
allowsCountDistinct in class JdbcDialectImpl
Returns:
whether Dialect allows COUNT DISTINCT

getDatabaseProduct

public Dialect.DatabaseProduct getDatabaseProduct()
Description copied from interface: Dialect
Returns the database for this Dialect, or Dialect.DatabaseProduct.UNKNOWN if the database is not a common database.

Specified by:
getDatabaseProduct in interface Dialect
Overrides:
getDatabaseProduct in class JdbcDialectImpl
Returns:
Database

supportsResultSetConcurrency

public boolean supportsResultSetConcurrency(int type,
                                            int concurrency)
Description copied from interface: Dialect
Returns whether this Dialect supports the given concurrency type in combination with the given result set type.

The result is similar to DatabaseMetaData.supportsResultSetConcurrency(int, int), except that the JdbcOdbc bridge in JDK 1.6 overstates its abilities. See bug 1690406.

Specified by:
supportsResultSetConcurrency in interface Dialect
Overrides:
supportsResultSetConcurrency in class JdbcDialectImpl
Parameters:
type - defined in ResultSet
concurrency - type defined in ResultSet
Returns:
true if so; false otherwise

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