Class NetezzaDialect
- java.lang.Object
-
- mondrian.spi.impl.JdbcDialectImpl
-
- mondrian.spi.impl.PostgreSqlDialect
-
- mondrian.spi.impl.NetezzaDialect
-
- All Implemented Interfaces:
Dialect
public class NetezzaDialect extends PostgreSqlDialect
Implementation ofDialectfor the Netezza database.- Since:
- April 17, 2009
- Author:
- swood
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.spi.Dialect
Dialect.DatabaseProduct, Dialect.Datatype
-
-
Field Summary
Fields Modifier and Type Field Description static JdbcDialectFactoryFACTORY-
Fields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion
-
-
Constructor Summary
Constructors Constructor Description NetezzaDialect(Connection connection)Creates a NetezzaDialect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowsRegularExpressionInWhereClause()Informs Mondrian if the dialect supports regular expressions when creating the 'where' or the 'having' clause.StringgenerateRegularExpression(String source, String javaRegex)Must generate a String representing a regular expression match operation between a string literal and a Java regular expression.Dialect.DatabaseProductgetDatabaseProduct()Returns the database for this Dialect, orDialect.DatabaseProduct.UNKNOWNif the database is not a common database.SqlStatement.TypegetType(ResultSetMetaData metaData, int columnIndex)Chooses the most appropriate type for accessing the values of a column in a result set for a dialect.-
Methods inherited from class mondrian.spi.impl.PostgreSqlDialect
generateOrderByNulls, requiresAliasForFromQuery
-
Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInline, generateInlineForAnsi, generateInlineGeneric, generateOrderByNullsAnsi, generateOrderItem, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpper
-
-
-
-
Field Detail
-
FACTORY
public static final JdbcDialectFactory FACTORY
-
-
Constructor Detail
-
NetezzaDialect
public NetezzaDialect(Connection connection) throws SQLException
Creates a NetezzaDialect.- Parameters:
connection- Connection- Throws:
SQLException
-
-
Method Detail
-
getDatabaseProduct
public Dialect.DatabaseProduct getDatabaseProduct()
Description copied from interface:DialectReturns the database for this Dialect, orDialect.DatabaseProduct.UNKNOWNif the database is not a common database.- Specified by:
getDatabaseProductin interfaceDialect- Overrides:
getDatabaseProductin classPostgreSqlDialect- Returns:
- Database
-
allowsRegularExpressionInWhereClause
public boolean allowsRegularExpressionInWhereClause()
Description copied from interface:DialectInforms Mondrian if the dialect supports regular expressions when creating the 'where' or the 'having' clause.- Specified by:
allowsRegularExpressionInWhereClausein interfaceDialect- Overrides:
allowsRegularExpressionInWhereClausein classPostgreSqlDialect- Returns:
- True if regular expressions are supported.
-
generateRegularExpression
public String generateRegularExpression(String source, String javaRegex)
Description copied from interface:DialectMust generate a String representing a regular expression match operation between a string literal and a Java regular expression. The string literal might be a column identifier or some other identifier, but the implementation must presume that it is already escaped and fit for use. The regular expression is not escaped and must be adapted to the proper dialect rules.Postgres / Greenplum example:
generateRegularExpression( "'foodmart'.'customer_name'", "(?i).*oo.*") -> 'foodmart'.'customer_name' ~ "(?i).*oo.*"Oracle example:
generateRegularExpression( "'foodmart'.'customer_name'", ".*oo.*") -> REGEXP_LIKE('foodmart'.'customer_name', ".*oo.*")Dialects are allowed to return null if the dialect cannot convert that particular regular expression into something that the database would support.
- Specified by:
generateRegularExpressionin interfaceDialect- Overrides:
generateRegularExpressionin classPostgreSqlDialect- Parameters:
source- A String identifying the column to match against.javaRegex- A Java regular expression to match against.- Returns:
- A dialect specific matching operation, or null if the dialect cannot convert that particular regular expression into something that the database would support.
-
getType
public SqlStatement.Type getType(ResultSetMetaData metaData, int columnIndex) throws SQLException
Description copied from interface:DialectChooses the most appropriate type for accessing the values of a column in a result set for a dialect.
Dialect-specific nuances involving type representation should be encapsulated in implementing methods. For example, if a dialect has implicit rules involving scale or precision, they should be handled within this method so the client can simply retrieve the "best fit" SqlStatement.Type for the column.
- Specified by:
getTypein interfaceDialect- Overrides:
getTypein classPostgreSqlDialect- Parameters:
metaData- Results set metadatacolumnIndex- Column ordinal (0-based)- Returns:
- the most appropriate SqlStatement.Type for the column
- Throws:
SQLException
-
-