Assembly: Db;
The ISQLCallback interface contains methods that are used to handle a generation process of query fro cube data extraction.
ISQLCallback
Methods of the interface must be redefined in the custom class. The class can be set as a handler for cube source using the IStandardCubeDataset.SetCallback method.
Query for data extraction contains several parts. Several parts of the query can be modified in the BeforeConstruction method. Finishing query settings can be made in the AfterConstruction method.
IMPORTANT. Query for cube data extraction can be modified only in extreme case with total confidence in those changes.
See below the list of parts that can be present in query. Angle brackets are not present in the request, they mark the block that can be modified. Syntax of each block depends on the type of DBMS in use.
Main query part where extracted data is specified: select <a.KEY,a.DATE,a.VALUE>. It is modified in the ISQLComponents.Select_ property.
Source from which data is extracted: from <DATA_TABLE a>. It is modified in the ISQLComponents.From_ property.
Full condition of selection for dimension elements: <((a.DATE in ({d'2010-01-01'},{d'2011-01-01'},{d'2012-01-01'}))) and ((a.KEY in (1,2,3,4,5,6,7,8,9,10))))>. It is modified in the ISQLComponents.Where property.
Grouping of results: GroupBy <KEY>. It is modified in the ISQLComponents.GroupBy property.
Expressions for aggregation: <COUNT(DISTINCT a.VALUE )>. It is modified in the ISQLComponents.Aggregation property.
Sorting of results: OrderBy <KEY>. It is modified in the ISQLComponents.OrderBy property.
Set of separate conditions that are included into ISQLComponents.Where. Number of conditions can be obtained in the ISQLComponents.ConditionCount property, the ISQLComponents.Condition property returns a separate condition. It is impossible to modify condition in ISQLComponents.Condition.
Alias that is used in query to reduce names of tables: a. It is possible to get alias in the ISQLComponents.TableAlias property, it is not possible to modify it.
The ISQLComponents.SubQuery property returns whether subqueries are used in query. The ISQLComponents.SubQuery value cannot be modified, the property that is necessary to use subqueries is specified in the IStandardCubeDataset.UseSubqueryOptimization property.
The presence of specific part depends on cube settings and its data source. Any parts can not be present.
Method name | Brief description | |
AfterConstruction | The AfterConstruction method is called after the query to select cube data is generated. | |
BeforeConstruction | The BeforeConstruction method is called before generating a query to extract cube data. |
See also: