DocBook|Search
Class Reference
%DeepSee.ResultSet
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%DeepSee] >  [ResultSet]
Private  Storage  

class %DeepSee.ResultSet extends %ZEN.DataModel.DataModel

This class provides an API for executing queries against DeepSee cubes and viewing the results.
This class extends Zen data model so that it can efficiently work within the Zen MVC framework.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
18 55


Summary

Properties
%Recompute %Statistics %Trace %UseCache
%id %seriesCount %seriesNames listing
listingFormatList listingPage listingPageSize listingRows

Methods
%%OIDGet %AddToSaveSet %CancelQuery %ClassIsLatestVersion
%ClassName %ClearStatistics %ConstructClone %DeleteModel
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Execute
%ExecuteAsynch %ExecuteAxes %ExecuteCells %ExecuteDirect
%ExecuteParameters %Extends %FormatNumber %GetAxisCount
%GetAxisMembers %GetAxisSize %GetCellCount %GetCellFormatOverride
%GetColumnTotal %GetCubeName %GetFiltersForCellRange %GetGrandTotal
%GetLastDataUpdate %GetLastSchemaUpdate %GetListingResultSet %GetListingSQL
%GetOrdinalLabel %GetOrdinalValue %GetParameter %GetParameterInfo
%GetPlan %GetPropertyInfo %GetQuery %GetQueryKey
%GetQueryStatus %GetQueryText %GetRowTotal %GetSlicerForCellRange
%GetStatus %GetValue %HasCellFormatOverride %InvokeAction
%IsA %IsDrillThrough %IsModified %IsReadOnly
%New %NormalizeObject %ObjectModified %OnDeleteModel
%OnDeleteSource %OnGetPropertyInfo %OnInvokeAction %OnLoadModel
%OnNewSource %OnOpenSource %OnSaveSource %OnStoreModel
%OnSubmit %OpenModel %OriginalNamespace %PackageName
%ParseMDX %PrepareKey %PrepareMDX %PrepareObject
%Print %PrintListing %PrintStatistics %RemoveFromSaveSet
%SaveModel %SerializeObject %SetListing %SetModified
%SetParameterContext %ShowPlan %SubmitHandler %ValidateObject


Properties

• property %Recompute as %Boolean [ InitialExpression = 1 ];
If true recompute previously run queries whose data has been updated otherwise return old values.
• property %Statistics as %DeepSee.Datatype.string [ MultiDimensional ];
Array of timing and performance statistics for the current query.
• property %Trace as %Boolean [ InitialExpression = 0 ];
Debugging flag. If true write out tracing information to the console.
• property %UseCache as %Boolean [ InitialExpression = 1 ];
If true, then use results caching for this query.
• property listing as %String(MAXLEN=255);
If set, this is the name of a listing within the current cube to use for detail listings.
• property listingFormatList as %String(MAXLEN=5000);
Formatting string to apply to listing results.
• property listingPage as %Integer [ InitialExpression = 1 ];
Current "page" of listing query.
• property listingPageSize as %Integer [ InitialExpression = 1000 ];
Number of rows within a listing query "page".
• property listingRows as %Integer [ InitialExpression = 0 ];
Number of rows in the current listing query.

Methods

• classmethod %CancelQuery(pCubeName As %String, pQueryKey As %String) as %Status
Cancel the query, if running, specified by the cube name and query key.
• method %ClearStatistics()
Clear out current statistics for this result set.
• method %Execute(ByRef pParms) as %Status
Execute the current prepared query for this ResultSet.
If defined, pParms is an array of parameter values subscripted by parameter name (case-insensitive). These are supplied to the query and override the default values for any parameters defined by the query.
• method %ExecuteAsynch(Output pQueryKey As %String, ByRef pParms, pWait As %Boolean = 0) as %Status
Perform a complete execution of the ResultSet using background agents.
The query must be prepared before calling this method.
If defined, pParms is an array of parameter values subscripted by parameter name (case-insensitive). These are supplied to the query and override the default values for any parameters defined by the query.
If pWait is true, wait for the query to complete execution before returning.
• method %ExecuteAxes() as %Status
Materialize the initial (pre-null-filtered) axes for this ResultSet.
• method %ExecuteCells() as %Status
Calculate the contents of the result cells for this Result Set.
• classmethod %ExecuteDirect(pMDX As %String, ByRef pParms, Output pSC As %Status) as %DeepSee.ResultSet
Convience method.
Creates a result set, prepares the query pMDX, and executes it.
Returns an instance of the result set.
• method %ExecuteParameters(ByRef pParms) as %Status
Apply the array of parameter values to the currently prepared query.
• classmethod %FormatNumber(pValue As %Decimal, pFormat As %String, Output pType As %String, Output pStyle As %String) as %String
Apply MDX FORMAT_STRING pFormat to numeric value pValue.
• method %GetAxisCount(Output pInfo As %Integer) as %Integer
Return number of axes within the result set (not including the slicer). Returns 0 if the query has not been prepared and had its axes executed.
On return, pInfo will contain array of axis number (1-based) to axis top node number.
• method %GetAxisMembers(pAxis As %Integer, Output pKey, pItemNo As %Integer = "") as %Status
Get information on the members of a specific axis within the current query.
pAxis is the axis number (1 = cols, 2 = rows, etc.), 0 indicates that information for the slicer axis is to be returned.
Because it is impossible to pre-determine the size of a specific axis, the process private global, ^||DeepSee.AxisMembers. The caller is responsible for killing this global.
On return, pKey contains the top-level subscript for the process private global under which the member information is stored.
The member information takes the form:
^||DeepSee.AxisMembers(pKey,pAxis,j,k) = $LB(nodeno,text,dimName,hierName,levelName,memberKey,dimNo,hierNo,levelNo,[aggregate])
pKey is the key returned by this method.
pAxis is the axis number.
j is the ordinal position of the tuple within the axis.
k is the ordinal position of the member within the tuple. k is 0 for members that form a stand-alone tuple. Otherwise k starts at 0 and increase towards the end of the tuple.
nodeno is the internal node number corresponding to the member within its axis.
text is the axis caption for the member.
Names are not enclosed within [ ] delimiters.
A fully-qualified name (UNAME) can be constructed by combining the names with the key:
Set tUName = "["_tDimName_"].["_tHierName_"].["_tLevelName_"].&["_tMemberKey_"]"
If pItemNo is provided, then it is the ordinal number of a single member within the axis and only information about this member is returned.
• method %GetAxisSize(pAxis As %Integer) as %Integer
Return number of visible nodes within the given axis (1-based).
• classmethod %GetCellCount(pCubeName As %String, pQueryKey As %String, Output pSC As %Status) as %Integer
Given a cube name and a query key (as returned by the %ExecuteAsync) return the number of result cells that are returned by the query.
• method %GetCellFormatOverride(pCell...) as %String
Determine if the format for the given cell has been overridden (such as by currentMember substitution) and return it. pCell... contains the ordinal address of the cell.
• method %GetColumnTotal(pColumn As %Integer, pAgg As %String = "sum") as %String
Get the total associated with the given column (1-based).
• method %GetCubeName() as %String
Return the name of the cube this ResultSet is executing against. The result set must be prepared before calling this.
• method %GetFiltersForCellRange(Output pFilters As %String, pStartRow As %Integer, pStartCol As %Integer, pEndRow As %Integer, pEndCol As %Integer, Output pMeasure As %String, pAllRows As %Boolean = 0, pAllCols As %Boolean = 0) as %Status
Find and return a an array of MDX %FILTER statements that will return the specified range of cells in the current query as a one-cell result.
On return, pFilters will contain the filter statement corresponding to each axis (1,2, etc) and the slicer (0).
For convenience, return the measure in play, if possible to determine.
• method %GetGrandTotal(pAgg As %String = "sum") as %String
Get the grand total for the current query.
This is a simple sum of all cells and not an "aggregate".
• method %GetLastDataUpdate() as %String
Output the cube last data update date in the XMLA format
• method %GetLastSchemaUpdate() as %String
Output the cube last schema update date in the XMLA format
• method %GetListingResultSet(Output pRS As %SQL.StatementResult, Output pFieldList As %List) as %Status
Prepare and execute the listing query for the current MDX statement. Return an SQL ResultSet that can be used to iterate over the listing. If pFieldList is not empty, then it is a $List of fields that should be selected and displayed from the result set.
• method %GetListingSQL() as %String
Return the SQL statement needed to drill into the source table for a DRILLTHROUGH statement. This may return the name of the DataConnector class if that is how the listing is defined.
• method %GetOrdinalLabel(Output pLabel As %String, pAxis As %Integer, pPosition As %Integer, Output pFormat As %String, Output pSolveOrder As %Integer, Output pStyle As %String, Output pHeaderStyle As %String) as %Integer
Find the axis label(s) for the item with ordinal position pPosition within axis pAxis (1 = cols, 2 = rows).
Returns, via pLabel an array of labels associated with the item from the most specific to the most general.
The return value is the number of labels returned.
Also returns, by reference the format and solve order for the label (higher solve order takes precedence over lower and is used to determine which axis should supply the format for a cell).
• method %GetOrdinalValue(pCell...) as %String
Get the value of the cell specified by the ordinal cell numbers pCell1, pCell2...
A cell number is the ordinal number of a cell along its axis.
The column axis is axis number 1, the row axis is axis number 2 and so on.
If the result has more dimensions than are provided, or if values are omitted, then the first cell along each additional dimension is used.
• method %GetParameterInfo(Output pParms) as %Status
Return the set of named parameters values defined by the query.
• method %GetPlan(Output pPlan) as %Status
Utility method.
Assemble the query plan for this query. The query must have been successfully executed.
• method %GetQuery() as %DeepSee.Query.query
Return the DeepSee run-time query object currently in use as the source for this result set.
• method %GetQueryKey() as %String
Return the current Query Key for this Result Set. The result set must be prepared before calling this.
• classmethod %GetQueryStatus(pCubeName As %String, pQueryKey As %String, Output pPercentComplete As %Double, Output pSC As %Status, Output pPendingResults As %Boolean) as %Integer
Given a cube name and a query key (as returned by the %ExecuteAsync) return the current status of the query.
0 indicates that nothing has been done; 100 indicates that query execution is complete and that results are ready; a value in between means that work is ongoing.
• method %GetQueryText() as %String
Return the text of the query currently associated with this result set. This text is generated from the query parse tree and represents the canonic form of the query.
• method %GetRowTotal(pRow As %Integer, pAgg As %String = "sum") as %String
Get the total associated with the given row (1-based).
• method %GetSlicerForCellRange(Output pSlicer As %String, pStartRow As %Integer, pStartCol As %Integer, pEndRow As %Integer, pEndCol As %Integer, Output pMeasure As %String) as %Status
Find and return an MDX slicer statement that will return the specified range of cells in the current query as a one-cell result.
For convenience, return the measure in play, if possible to determine.
• method %GetStatus(Output pPercentComplete As %Double, Output pSC As %Status, Output pPendingResults As %Boolean) as %Integer
Instance method version of %GetQueryStatus.
• method %GetValue(pNode...) as %String
Get the value of the cell specified by the node numbers pNode1, pNode2...
• method %HasCellFormatOverride() as %Boolean
Return true if the current query has to be tested for cell format overrides.
• method %IsDrillThrough() as %Boolean
Test if this is a DRILLTHROUGH statement.
• method %ParseMDX(pMDX As %String, pQuery As %DeepSee.Query.query) as %Status
Lower-level function that, given the text of a DeepSee MDX query, pMDX, parses it and converts it to a DeepSee run-time query object without changing the state of this Result Set.
• method %PrepareKey(pCubeName As %String, pQueryKey As %String) as %Status
Given a DeepSee query key, pQueryKey, (returned by a previous query prepare), restore the state of the query so that it can be executed.
• method %PrepareMDX(pMDX As %String) as %Status
Given the text of a DeepSee MDX query, pMDX, parse it, convert it to a DeepSee run-time query object, and prepare it so that it can then be executed.
• method %PrepareObject(pQuery As %DeepSee.Query.query) as %Status
Given a DeepSee run-time query, pQuery, prepare it so that it can then be executed.
• method %Print(Output pStats, pShowNodeNo As %Boolean = 0, pMaxRows As %Integer = 0) as %Status
Utility method. Print the results of the current query to the console.
If pShowNodeNo is true, show the internal node numbers.
If pMaxRows is defined, limit the number of rows displayed.
• method %PrintListing()
Utility method.
For a DRILLTHROUGH query, print out the listing.
• method %PrintStatistics()
Write out current statistics for this result set.
• method %SetListing(pListing As %String) as %Status
Specify which listing to use for detail listings.
• method %SetParameterContext(ByRef pContext) as %Status
Take a pre-defined set of named parameters and apply them to MDX queries executed against this result set.
This makes it possible to add defined parameters to a query without adding them to the query text. This is different than supplying run-time values for parameters when executing the query.
The named parameter context is an array subscripted by UPPER CASE parameter name and parameter attribute (which can be "VALUE","TYPE",or "CAPTION").
For example:
pContext("CITY","VALUE") = "New York"
Call this before preparing a query.
• method %ShowPlan()
Utility method.
Print out the plan for this query to the console. The query must have been successfully executed.