mondrian.rolap
Class RolapNativeSql

java.lang.Object
  extended by mondrian.rolap.RolapNativeSql

public class RolapNativeSql
extends Object

Creates SQL from parse tree nodes. Currently it creates the SQL that accesses a measure for the ORDER BY that is generated for a TopCount.

Since:
Nov 17, 2005
Author:
av
 

Nested Class Summary
(package private)  class RolapNativeSql.CalculatedMemberSqlCompiler
          compiles the underlying expression of a calculated member
(package private) static class RolapNativeSql.CompositeSqlCompiler
          Implementation of RolapNativeSql.SqlCompiler that uses chain of responsibility to find a matching sql compiler.
(package private)  class RolapNativeSql.FunCallSqlCompiler
          compiles a funcall, e.g.
(package private)  class RolapNativeSql.FunCallSqlCompilerBase
          contains utility methods to compile FunCall expressions into SQL.
(package private)  class RolapNativeSql.IifSqlCompiler
          compiles an IIF(cond, val1, val2) expression into SQL CASE WHEN cond THEN val1 ELSE val2 END
(package private)  class RolapNativeSql.InfixOpSqlCompiler
          compiles an infix operator like addition into SQL like (a + b)
(package private)  class RolapNativeSql.IsEmptySqlCompiler
          compiles an IsEmpty(measure) expression into SQL measure is null
(package private)  class RolapNativeSql.MemberSqlCompiler
          base class to remove MemberScalarExp
(package private)  class RolapNativeSql.NumberSqlCompiler
          Compiles a numeric literal to SQL.
(package private)  class RolapNativeSql.ParenthesisSqlCompiler
          shortcut for ()
(package private) static interface RolapNativeSql.SqlCompiler
          Translates an expression into SQL
(package private)  class RolapNativeSql.StoredMeasureSqlCompiler
          compiles a measure into SQL, the measure will be aggregated like sum(measure)
(package private)  class RolapNativeSql.UnaryOpSqlCompiler
          shortcut for an unary operator like NOT(a)
 
Field Summary
(package private)  RolapNativeSql.CompositeSqlCompiler booleanCompiler
           
(package private)  RolapNativeSql.CompositeSqlCompiler numericCompiler
           
(package private)  RolapStoredMeasure storedMeasure
           
 
Constructor Summary
RolapNativeSql(SqlQuery sqlQuery)
          creates a new instance
 
Method Summary
 String generateFilterCondition(Exp exp)
           
 String generateTopCountOrderBy(Exp exp)
          generates an aggregate of a measure, e.g.
 RolapStoredMeasure getStoredMeasure()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numericCompiler

RolapNativeSql.CompositeSqlCompiler numericCompiler

booleanCompiler

RolapNativeSql.CompositeSqlCompiler booleanCompiler

storedMeasure

RolapStoredMeasure storedMeasure
Constructor Detail

RolapNativeSql

RolapNativeSql(SqlQuery sqlQuery)
creates a new instance

Parameters:
sqlQuery - the query which is needed for differen SQL dialects - its not modified.
Method Detail

generateTopCountOrderBy

public String generateTopCountOrderBy(Exp exp)
generates an aggregate of a measure, e.g. "sum(Store_Sales)" for TopCount. The returned expr will be added to the select list and to the order by clause.


generateFilterCondition

public String generateFilterCondition(Exp exp)

getStoredMeasure

public RolapStoredMeasure getStoredMeasure()

SourceForge.net_Logo