Package | Description |
---|---|
mondrian.olap |
Mondrian's core package, this defines connections and the catalog metamodel,
and allows you to execute queries.
|
mondrian.rolap |
Implements the data access layer for the olap package.
|
mondrian.rolap.agg |
Manages a cache of aggregates containing cell values.
|
mondrian.rolap.aggmatcher |
Defines a 'matcher' which scans the schema to find candidate aggregate tables.
|
mondrian.rolap.sql |
Database-independent library for generating SQL.
|
Modifier and Type | Method and Description |
---|---|
String |
MondrianDef.Expression.getExpression(SqlQuery query) |
String |
MondrianDef.Column.getExpression(SqlQuery query) |
String |
MondrianDef.ExpressionView.getExpression(SqlQuery query) |
Modifier and Type | Method and Description |
---|---|
SqlQuery |
RolapStar.getSqlQuery()
Clones an existing SqlQuery to create a new one (this cloning creates one
with an empty sql query).
|
SqlQuery |
RolapStar.Column.getSqlQuery() |
Modifier and Type | Method and Description |
---|---|
void |
SqlContextConstraint.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar)
Called from LevelMembers: restricts the SQL resultset to the current
context.
|
void |
RolapNativeSet.SetConstraint.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar) |
void |
DefaultTupleConstraint.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar) |
static void |
SqlConstraintUtils.addContextConstraint(SqlQuery sqlQuery,
AggStar aggStar,
Evaluator evaluator,
RolapCube baseCube,
boolean restrictMemberTypes)
For every restricting member in the current context, generates
a WHERE condition and a join to the fact table.
|
void |
SqlContextConstraint.addLevelConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level) |
void |
DefaultMemberChildrenConstraint.addLevelConstraint(SqlQuery query,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level) |
void |
DefaultTupleConstraint.addLevelConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level) |
protected void |
SqlTupleReader.addLevelMemberSql(SqlQuery sqlQuery,
RolapLevel level,
RolapCube baseCube,
mondrian.rolap.SqlTupleReader.WhichSelect whichSelect,
AggStar aggStar)
Generates the SQL statement to access members of
level . |
void |
SqlContextConstraint.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
List<RolapMember> parents)
Adds
parents to the current
context and restricts the SQL resultset to that new context. |
void |
DefaultMemberChildrenConstraint.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
List<RolapMember> parents) |
static void |
SqlConstraintUtils.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
List<RolapMember> members,
boolean restrictMemberTypes,
boolean crossJoin,
boolean exclude)
Creates a "WHERE exp IN (...)" condition containing the values
of all parents.
|
void |
SqlContextConstraint.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapMember parent)
Called from MemberChildren: adds
parent to the current
context and restricts the SQL resultset to that new context. |
void |
DefaultMemberChildrenConstraint.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapMember parent) |
static void |
SqlConstraintUtils.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapMember parent,
boolean restrictMemberTypes)
Creates a "WHERE parent = value" constraint.
|
void |
RolapStar.Table.addToFrom(SqlQuery query,
boolean failIfExists,
boolean joinToParent)
Adds this table to the FROM clause of a query, and also, if
joinToParent , any join condition. |
static String |
SqlConstraintUtils.constrainLevel(RolapLevel level,
SqlQuery query,
RolapCube baseCube,
AggStar aggStar,
String[] columnValue,
boolean caseSensitive)
Generates a sql expression constraining a level by some value
|
static String |
SqlConstraintUtils.constrainLevel(RolapLevel level,
SqlQuery query,
RolapCube baseCube,
AggStar aggStar,
String columnValue,
boolean caseSensitive) |
static String |
SqlConstraintUtils.constrainLevel2(SqlQuery query,
MondrianDef.Expression exp,
Dialect.Datatype datatype,
Comparable columnValue)
Generates a sql expression constraining a level by some value
|
static String |
RolapStar.Column.createInExpr(String expr,
StarColumnPredicate predicate,
Dialect.Datatype datatype,
SqlQuery sqlQuery)
Generates a predicate that a column matches one of a list of values.
|
String |
RolapStar.Column.generateExprString(SqlQuery query)
Generates a SQL expression, which typically this looks like
this:
tableName.columnName . |
static String |
SqlConstraintUtils.getColumnExpr(SqlQuery sqlQuery,
AggStar aggStar,
RolapStar.Column column)
Get the column expression from the AggStar if provided or the regular
table if not, and ensure table is in From
|
String |
RolapStar.Condition.getLeft(SqlQuery query) |
String |
RolapStar.Condition.getRight(SqlQuery query) |
static void |
SqlConstraintUtils.joinLevelTableToFactTable(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
Evaluator e,
RolapCubeLevel level)
Ensures that the table of
level is joined to the fact
table |
void |
StarPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
String |
RolapStar.Condition.toString(SqlQuery query) |
Constructor and Description |
---|
RolapNativeSql(SqlQuery sqlQuery,
AggStar aggStar,
Evaluator evaluator,
RolapLevel rolapLevel)
Creates a RolapNativeSql.
|
Modifier and Type | Method and Description |
---|---|
protected SqlQuery |
AbstractQuerySpec.newSqlQuery()
Creates a query object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractQuerySpec.addGroupingFunction(SqlQuery sqlQuery) |
protected void |
AbstractQuerySpec.addGroupingSets(SqlQuery sqlQuery,
Map<String,String> groupingSetsAliases) |
protected void |
AbstractQuerySpec.addMeasure(int i,
SqlQuery sqlQuery)
Adds a measure to a query.
|
BitKey |
AndPredicate.checkInList(SqlQuery sqlQuery,
BitKey inListLHSBitKey) |
protected Map<String,String> |
AbstractQuerySpec.distinctGenerateSql(SqlQuery outerSqlQuery,
boolean countOnly)
Generates a SQL query to retrieve the values in this segment using
an algorithm which converts distinct-aggregates to non-distinct
aggregates over subqueries.
|
protected void |
AbstractQuerySpec.extraPredicates(SqlQuery sqlQuery)
Adds predicates not associated with columns.
|
protected Map<String,String> |
AbstractQuerySpec.nonDistinctGenerateSql(SqlQuery sqlQuery) |
void |
ValueColumnPredicate.toInListSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
AndPredicate.toInListSql(SqlQuery sqlQuery,
StringBuilder buf,
BitKey inListRHSBitKey)
Generate value list for this predicate to be used in an IN-list
sql predicate.
|
void |
ListColumnPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
AbstractColumnPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
OrPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
LiteralStarPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
ListPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
ValueColumnPredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
void |
MemberTuplePredicate.toSql(SqlQuery sqlQuery,
StringBuilder buf) |
Modifier and Type | Method and Description |
---|---|
protected SqlQuery |
AggGen.getSqlQuery() |
protected SqlQuery |
AggStar.Table.getSqlQuery()
Get a SqlQuery object.
|
SqlQuery |
AggStar.Table.Column.getSqlQuery() |
Modifier and Type | Method and Description |
---|---|
void |
AggStar.Table.addToFrom(SqlQuery query,
boolean failIfExists,
boolean joinToParent)
This is a copy of the code found in RolapStar used to generate an SQL
query.
|
String |
AggStar.Table.Column.generateExprString(SqlQuery query)
Generates a SQL expression, which typically this looks like
this:
tableName.columnName . |
String |
AggStar.FactTable.Measure.generateExprString(SqlQuery query) |
String |
AggStar.FactTable.Measure.generateRollupString(SqlQuery query) |
String |
AggStar.Table.JoinCondition.getLeft(SqlQuery query)
Return the left join expression as string.
|
Modifier and Type | Method and Description |
---|---|
SqlQuery |
SqlQuery.cloneEmpty()
Creates an empty
SqlQuery with the same environment as this
one. |
static SqlQuery |
SqlQuery.newQuery(DataSource dataSource,
String err) |
Modifier and Type | Method and Description |
---|---|
void |
TupleConstraint.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar)
Modifies a Level.Members query.
|
void |
MemberListCrossJoinArg.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar) |
void |
MemberKeyConstraint.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar) |
void |
CrossJoinArg.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar) |
void |
DescendantsCrossJoinArg.addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar) |
void |
SqlQuery.addFrom(SqlQuery sqlQuery,
String alias,
boolean failIfExists) |
void |
TupleConstraint.addLevelConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level)
Will be called multiple times for every "group by" level in
Level.Members query, i.e.
|
void |
MemberChildrenConstraint.addLevelConstraint(SqlQuery query,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level)
Will be called once for the level that contains the
children of a Member.Children query.
|
void |
MemberKeyConstraint.addLevelConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level) |
void |
MemberChildrenConstraint.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
List<RolapMember> parents)
Modifies a
Member.Children query so that (all or some)
children of all parent members contained in parents
will be returned in the result set. |
void |
MemberChildrenConstraint.addMemberConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar,
RolapMember parent)
Modifies a
Member.Children query so that only the children
of parent will be returned in the result set. |
void |
SqlQueryChecker.onGenerate(SqlQuery q) |
Copyright © 2018 Hitachi Vantara. All rights reserved.