Package mondrian.spi.impl
Class FirebirdDialect
- java.lang.Object
-
- mondrian.spi.impl.JdbcDialectImpl
-
- mondrian.spi.impl.FirebirdDialect
-
- All Implemented Interfaces:
Dialect
public class FirebirdDialect extends JdbcDialectImpl
Implementation ofDialectfor the Firebird database.- Since:
- Nov 23, 2008
- Author:
- jhyde
-
-
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 FirebirdDialect(Connection connection)Creates a FirebirdDialect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowsAs()Returns whether the SQL dialect allows "AS" in the FROM clause.StringgenerateOrderByNulls(String expr, boolean ascending, boolean collateNullsLast)Generates SQL to force null values to collate last.-
Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInline, generateInlineForAnsi, generateInlineGeneric, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresAliasForFromQuery, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsGroupingSets, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpper
-
-
-
-
Field Detail
-
FACTORY
public static final JdbcDialectFactory FACTORY
-
-
Constructor Detail
-
FirebirdDialect
public FirebirdDialect(Connection connection) throws SQLException
Creates a FirebirdDialect.- Parameters:
connection- Connection- Throws:
SQLException
-
-
Method Detail
-
allowsAs
public boolean allowsAs()
Description copied from interface:DialectReturns whether the SQL dialect allows "AS" in the FROM clause. If so, "SELECT * FROM t AS alias" is a valid query.- Specified by:
allowsAsin interfaceDialect- Overrides:
allowsAsin classJdbcDialectImpl- Returns:
- whether dialect allows AS in FROM clause
-
generateOrderByNulls
public String generateOrderByNulls(String expr, boolean ascending, boolean collateNullsLast)
Description copied from class:JdbcDialectImplGenerates SQL to force null values to collate last.This default implementation makes use of the ANSI SQL 1999 CASE-WHEN-THEN-ELSE in conjunction with IS NULL syntax. The resulting SQL will look something like this:
CASE WHEN "expr" IS NULL THEN 0 ELSE 1 ENDYou can override this method for a particular database to use something more efficient, like ISNULL().
ANSI SQL provides the syntax "ASC/DESC NULLS LAST" and "ASC/DESC NULLS FIRST". If your database supports the ANSI syntax, implement this method by calling
JdbcDialectImpl.generateOrderByNullsAnsi(java.lang.String, boolean, boolean).This method is only called from
JdbcDialectImpl.generateOrderItem(String, boolean, boolean, boolean). Some dialects override that method and therefore never call this method.- Overrides:
generateOrderByNullsin classJdbcDialectImpl- Parameters:
expr- Expression.ascending- Whether ascending.collateNullsLast- Whether nulls should appear first or last.- Returns:
- Expression to force null values to collate last or first.
-
-