IRISLIB database
ResultSet Class Reference

This class provides an API for executing queries against DeepSee cubes and viewing the results. More...

Inheritance diagram for ResultSet:
Collaboration diagram for ResultSet:

Public Member Functions

_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Public Attributes

 listing
 If set, this is the name of a listing within the current cube to use for detail listings. More...
 
 listingFormatList
 Formatting string to apply to listing results. More...
 
 listingPage
 Current "page" of listing query. More...
 
 listingPageSize
 Number of rows within a listing query "page". More...
 
 listingRows
 Number of rows in the current listing query. More...
 

Private Member Functions

_.Library.Boolean AcquireLocks (_.Library.Status pStatus, _.Library.String pLockMode)
 This class provides an API for executing queries against DeepSee cubes and viewing the results. More...
 
_.Library.Status ClearLocalResult ()
 Perform the actual work of deleting the local copies of the Results and Axis caches.
 
_.Library.Status ClearLockKeys (_.Library.String pLockMode)
 Clear up the locks held by the process and reset the local state variables. More...
 
 ClearStatistics ()
 Clear out current statistics for this result set.
 
_.Library.Status CopyLockKeysToQuery (pWait)
 This method copies the current ResultSet's lock keys into the active query to make the. More...
 
_.Library.Status CopyResultToLocal ()
 This does the actual work of copying results from the shared caches to a local copy unique to this ResultSet's. More...
 
_.Library.Status Execute (pParms)
 Execute the current prepared query for this ResultSet. More...
 
_.Library.Status ExecuteAsynch (_.Library.String pQueryKey, pParms, _.Library.Boolean pWait, _.Library.Boolean pAxesOnly, _.Library.String pAxesQuery)
 Perform a complete execution of the ResultSet using. More...
 
_.Library.Status ExecuteAxes ()
 Materialize the initial (pre-null-filtered) axes for this ResultSet.
 
_.Library.Status ExecuteCells ()
 Calculate the contents of the result cells for this Result Set.
 
_.Library.Status ExecuteParameters (pParms)
 Apply the array of parameter values to the currently prepared query.
 
_.Library.Integer GetAxisCount (_.Library.Integer pInfo)
 Return number of axes within the result set (not including the slicer). More...
 
_.Library.Status GetAxisMembers (_.Library.Integer pAxis, pKey, _.Library.Integer pItemNo)
 Get information on the members of a specific axis within the current query. More...
 
_.Library.Integer GetAxisSize (_.Library.Integer pAxis)
 Return number of visible nodes within the given axis (1-based).
 
_.Library.Integer GetCellCount (_.Library.String pCubeName, _.Library.String pQueryKey, _.Library.Status pSC)
 Given a cube name and a query key (as returned by the <method>ExecuteAsync</method>) More...
 
_.Library.String GetCellFormatOverride (pCell)
 Determine if the format for the given cell has been overridden (such as by. More...
 
_.Library.String GetCellMetric (_.Library.Integer pRow, _.Library.Integer pCol, _.Library.Status pSC)
 Provided a (row,col) cell address within this resultset, determine which measure is being applied.
 
_.Library.Integer GetColumnCount ()
 Return the count of columns in results table.
 
_.Library.String GetColumnTotal (_.Library.Integer pColumn, _.Library.String pAgg)
 Get the total associated with the given column (1-based). More...
 
_.Library.String GetCubeName ()
 Return the name of the cube this ResultSet is executing against. More...
 
_.Library.Status GetFiltersForCellRange (_.Library.String pFilters, _.Library.Integer pStartRow, _.Library.Integer pStartCol, _.Library.Integer pEndRow, _.Library.Integer pEndCol, _.Library.String pMeasure, _.Library.Boolean pAllRows, _.Library.Boolean pAllCols, _.Library.Integer pSortCol, _.Library.String pSortDir, _.Library.String pPluginInfo)
 Find and return a an array of MDX FILTER statements that will return the specified range of cells in. More...
 
_.Library.String GetGrandTotal (_.Library.String pAgg)
 Get the grand total for the current query. More...
 
_.Library.String GetLastDataUpdate ()
 Output the cube last data update date in the XMLA format.
 
_.Library.String GetLastSchemaUpdate ()
 Output the cube last schema update date in the XMLA format.
 
_.Library.Status GetListingResultSet (_.SQL.StatementResult pRS, _.Library.List pFieldList)
 Prepare and execute the listing query for the current MDX statement. More...
 
_.Library.String GetListingSQL ()
 Return the SQL statement needed to drill into the source table for a DRILLTHROUGH statement. More...
 
_.Library.Integer GetOrdinalKey (_.Library.String pKey, _.Library.Integer pAxis, _.Library.Integer pPosition, pSpec)
 Find the axis key(s) for the item with ordinal position. More...
 
_.Library.Integer GetOrdinalLabel (_.Library.String pLabel, _.Library.Integer pAxis, _.Library.Integer pPosition, _.Library.String pFormat, _.Library.Integer pSolveOrder, _.Library.String pStyle, _.Library.String pHeaderStyle, _.Library.String pClasses, _.Library.String pTimeFormat)
 Find the axis label(s) for the item with ordinal position. More...
 
_.Library.String GetOrdinalValue (pCell)
 Get the value of the cell specified by the ordinal cell numbers. More...
 
_.Library.Status GetParameterInfo (pParms)
 Return the set of named parameters values defined by the query.
 
_.Library.Status GetPlan (pPlan)
 Utility method. More...
 
_.DeepSee.Query.query GetQuery ()
 Return the DeepSee run-time query object currently in use. More...
 
_.Library.String GetQueryKey ()
 Return the current Query Key for this Result Set. More...
 
_.Library.String GetQueryText ()
 Return the text of the query currently associated with this result set. More...
 
_.Library.Integer GetRowCount ()
 Return the count of rows in results table.
 
_.Library.String GetRowTotal (_.Library.Integer pRow, _.Library.String pAgg)
 Get the total associated with the given row (1-based). More...
 
_.Library.Status GetSlicerForCellRange (_.Library.String pSlicer, _.Library.Integer pStartRow, _.Library.Integer pStartCol, _.Library.Integer pEndRow, _.Library.Integer pEndCol, _.Library.String pMeasure)
 Find and return an MDX slicer statement that will return the specified range of cells in. More...
 
_.Library.String GetStatistic (_.Library.String pStat)
 Get the value of a specific query statistic. More...
 
_.Library.Integer GetStatus (_.Library.Double pPercentComplete, _.Library.Status pSC, _.Library.Boolean pPendingResults)
 Instance method version of <method>GetQueryStatus</method>.
 
_.Library.String GetValue (pNode)
 Get the value of the cell specified by the node numbers. More...
 
_.Library.Boolean HasCellFormatOverride ()
 Return true if the current query has to be tested for cell format overrides.
 
_.Library.Status InitializeResultSet ()
 Initialize this resultset to ready it for executing a new query. More...
 
_.Library.Boolean IsDrillThrough ()
 Test if this is a DRILLTHROUGH statement.
 
_.Library.Status ParseMDX (_.Library.String pMDX, _.DeepSee.Query.query pQuery)
 Lower-level function that, given the text of a DeepSee MDX query, pMDX,. More...
 
_.Library.Status PrepareKey (_.Library.String pCubeName, _.Library.String pQueryKey, pParms, _.Library.String pOriginalMDX)
 Given a DeepSee query key, pQueryKey,. More...
 
_.Library.Status PrepareMDX (_.Library.String pMDX, pVariables, pResolvedMDX)
 Given the text of a DeepSee MDX query, pMDX,. More...
 
_.Library.Status PrepareObject (_.DeepSee.Query.query pQuery, pVariables)
 Given a DeepSee run-time query, pQuery,. More...
 
_.Library.Status Print (pStats, _.Library.Boolean pShowNodeNo, _.Library.Integer pMaxRows)
 Utility method. More...
 
 PrintListing ()
 Utility method. More...
 
 PrintStatistics ()
 Write out current statistics for this result set.
 
_.Library.Status ReleaseLocks (_.Library.String pLockMode)
 Release all locks of the type pLockMode held by this ResultSet.
 
_.Library.Status RunQueryAuditCode (_.DeepSee.Query.query pQuery)
 Run the query audit code. More...
 
_.Library.Status SetAncestorLockKeys (pAncestorLocks)
 Fill the <property>AncestorLockKeys</property> array for the current ResultSet using the named lock keys defined in. More...
 
_.Library.Status SetListing (_.Library.String pListing)
 Specify which listing to use for detail listings.
 
_.Library.Status SetLocationCommon ()
 Look at common cache for reading data.
 
_.Library.Status SetLocationLocal ()
 Look at local cache for reading data.
 
_.Library.Status SetLockKeys (pRefreshKeys, pWait)
 Fill the <property>LockKeys</property> array for the current query. More...
 
_.Library.Status SetLockMode (pType)
 Accessor method for changing the <property>LockMode</property> of this ResultSet. More...
 
_.Library.Status SetParameterContext (pContext)
 Take a pre-defined set of named parameters and apply them to MDX. More...
 
_.Library.Integer SetSubqueryResultset (_.DeepSee.ResultSet pRS, _.Library.Status pStatus)
 Add a subquery resultset to the list of objects needed to complete this query. More...
 
 ShowPlan ()
 Utility method. More...
 
_.Library.Status SwitchToCommonCache ()
 This method returns the pointers to uing the common cache.
 
_.Library.Status SwitchToLocalCache ()
 Create a local copy of the shared Results and Axis caches and reconfigure the location pointers to the private cache data.
 
_.Library.Status UpdatePendingResults (_.Library.Boolean pPending)
 If the given query has pending results (such as from plug-ins), update them. More...
 

Static Private Member Functions

_.Library.Status CancelQuery (_.Library.String pCubeName, _.Library.String pQueryKey)
 Cancel the query, if running, specified by the cube name and query key.
 
_.Library.Status CreateTable (_.Library.String pCubeName, _.Library.String pNewTableName, _.Library.String pContext, _.Library.String pListingFields, _.Library.String pListingName)
 Create an SQL table from DeepSee cube context. More...
 
_.DeepSee.ResultSet ExecuteDirect (_.Library.String pMDX, pParms, _.Library.Status pSC, pAsync, pWait)
 Convenience method. More...
 
_.Library.String FormatNumber (_.Library.Decimal pValue, _.Library.String pFormat, _.Library.String pType, _.Library.String pStyle)
 Apply MDX FORMAT_STRING pFormat to numeric value pValue.
 
_.Library.Integer GetQueryStatus (_.Library.String pCubeName, _.Library.String pQueryKey, _.Library.Double pPercentComplete, _.Library.Status pSC, _.Library.Boolean pPendingResults)
 Given a cube name and a query key (as returned by the <method>ExecuteAsync</method>) More...
 

Additional Inherited Members

- Static Public Attributes inherited from DataModel
 READONLYMODEL = None
 This is the abstract base class used by all model classes within the Zen Model-View-Controller mechanism. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

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.

Member Function Documentation

◆ AcquireLocks()

_.Library.Boolean AcquireLocks ( _.Library.Status  pStatus,
_.Library.String  pLockMode 
)
private

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.

Acquire locks needed to secure access to the shared result and axes caches for this query. The parameter pLockMode

controls which type of locks (exclusive/shared) should be attempted, by default this will be the ResultSet's current <property>LockMode</property> setting. This method returns either
0 - The method was unable to acquire all of the locks associated with this query
1 - The method has successfully acquired all locks needed to safely interact with the shared cache
In the event a "0" is returned, any and all locks acquired by this process are released.

◆ ClearLockKeys()

_.Library.Status ClearLockKeys ( _.Library.String  pLockMode)
private

Clear up the locks held by the process and reset the local state variables.

If pLockMode is supplied, use it to set the ResultSet's LockMode.

◆ CopyLockKeysToQuery()

_.Library.Status CopyLockKeysToQuery (   pWait)
private

This method copies the current ResultSet's lock keys into the active query to make the.

references available for subqeries and tasks. If pWait is set, this communicates the current ResultSet intends to wait for results and will maintain a hold on the locks securing the current resources.

◆ CopyResultToLocal()

_.Library.Status CopyResultToLocal ( )
private

This does the actual work of copying results from the shared caches to a local copy unique to this ResultSet's.

<property>SessionKey</property>. This operation can only be performed if the ResultSet has locks engaged.

◆ CreateTable()

_.Library.Status CreateTable ( _.Library.String  pCubeName,
_.Library.String  pNewTableName,
_.Library.String  pContext,
_.Library.String  pListingFields,
_.Library.String  pListingName 
)
staticprivate

Create an SQL table from DeepSee cube context.

Arguments:

pCubeName (Required) - The name of the cube the new table should be generated from.
pNewTableName (Required) - The name of the table or class definition where the new result is to be stored. This must be a valid Schema.Table or Package.Class name, and the current user must have permission to create this class in the database to which it is mapped.
pContext (Optional) - An MDX restriction term which limits the results in the cube. While not required, this is strongly recommended since its ommission will result in the entire cube source being transferred to a table.
pListingFields (Optional) - A comma-delimited list of field names to be included in the new table. The field names must exist in the cube's source.
pListingName (Optional) - A named listing that is defined for use in the cube. This may be a native listing or a listing defined in a listing group. This will not be used if pListingFields is defined.

Most commonly this would be called from a KPI Action class. For example, an OnDashboardAction callback might look like:

ClassMethod OnDashboardAction(pAction As String, pContext As ZEN.proxyObject) As Status { Set tSC = $$$OK Try { Set tFilter = $P(pContext.currFilterSpec," ",2,*) Set tNewTableName = "Test.CreateResultTable" Set tListingFields = "" Set tListingName = "Listing" Set tSC = ##class(DeepSee.ResultSet).CreateTable(pContext.cubeName, tNewTableName, tFilter, tListingFields, tListingName) } Catch ex { Set tSC = ex.AsStatus() }

Quit tSC }

For simplicity this example hard codes the name of the new class definition, but this is not recommended in practice. The API will not replace any existing class, returning an error message instead. In order to allow the user to create their own class name, as well as provide the option to set values for tListingFields or tListingName, it is recommended the KPI action launch a popup dialog which manages the user's interaction with these settings and then calls the CreateTable API.

◆ Execute()

_.Library.Status Execute (   pParms)
private

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.

◆ ExecuteAsynch()

_.Library.Status ExecuteAsynch ( _.Library.String  pQueryKey,
  pParms,
_.Library.Boolean  pWait,
_.Library.Boolean  pAxesOnly,
_.Library.String  pAxesQuery 
)
private

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.
If pAxesOnly is true, then only execute the axes for the query.

◆ ExecuteDirect()

_.DeepSee.ResultSet ExecuteDirect ( _.Library.String  pMDX,
  pParms,
_.Library.Status  pSC,
  pAsync,
  pWait 
)
staticprivate

Convenience method.


Creates a result set, prepares the query pMDX, and executes it.
Returns an instance of the result set.

◆ GetAxisCount()

_.Library.Integer GetAxisCount ( _.Library.Integer  pInfo)
private

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.

◆ GetAxisMembers()

_.Library.Status GetAxisMembers ( _.Library.Integer  pAxis,
  pKey,
_.Library.Integer  pItemNo 
)
private

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 is used to hold the results. 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.

◆ GetCellCount()

_.Library.Integer GetCellCount ( _.Library.String  pCubeName,
_.Library.String  pQueryKey,
_.Library.Status  pSC 
)
private

Given a cube name and a query key (as returned by the <method>ExecuteAsync</method>)

return the number of result cells that are returned by the query.

◆ GetCellFormatOverride()

_.Library.String GetCellFormatOverride (   pCell)
private

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.

◆ GetColumnTotal()

_.Library.String GetColumnTotal ( _.Library.Integer  pColumn,
_.Library.String  pAgg 
)
private

Get the total associated with the given column (1-based).


◆ GetCubeName()

_.Library.String GetCubeName ( )
private

Return the name of the cube this ResultSet is executing against.

The result set must be prepared before calling this.

◆ GetFiltersForCellRange()

_.Library.Status GetFiltersForCellRange ( _.Library.String  pFilters,
_.Library.Integer  pStartRow,
_.Library.Integer  pStartCol,
_.Library.Integer  pEndRow,
_.Library.Integer  pEndCol,
_.Library.String  pMeasure,
_.Library.Boolean  pAllRows,
_.Library.Boolean  pAllCols,
_.Library.Integer  pSortCol,
_.Library.String  pSortDir,
_.Library.String  pPluginInfo 
)
private

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. For cell ranges with multiple measures, the measure applied to the cell pStartRow, pStartCol is returned.

◆ GetGrandTotal()

_.Library.String GetGrandTotal ( _.Library.String  pAgg)
private

Get the grand total for the current query.


This is a simple sum of all cells and not an "aggregate".

◆ GetListingResultSet()

_.Library.Status GetListingResultSet ( _.SQL.StatementResult  pRS,
_.Library.List  pFieldList 
)
private

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.

◆ GetListingSQL()

_.Library.String GetListingSQL ( )
private

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.

◆ GetOrdinalKey()

_.Library.Integer GetOrdinalKey ( _.Library.String  pKey,
_.Library.Integer  pAxis,
_.Library.Integer  pPosition,
  pSpec 
)
private

Find the axis key(s) for the item with ordinal position.

pPosition within axis pAxis (1 = cols, 2 = rows).
Returns, via pKey an array of labels associated with the item from the most specific to the most general.
If the item on the axis has no key (for example, measures), a placeholder "" is inserted into the pKey array to preserve the same structure as returned by <method>GetOrdinalLabel</method>.
The return value is the number of keys returned.

◆ GetOrdinalLabel()

_.Library.Integer GetOrdinalLabel ( _.Library.String  pLabel,
_.Library.Integer  pAxis,
_.Library.Integer  pPosition,
_.Library.String  pFormat,
_.Library.Integer  pSolveOrder,
_.Library.String  pStyle,
_.Library.String  pHeaderStyle,
_.Library.String  pClasses,
_.Library.String  pTimeFormat 
)
private

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). pClasses an array of classes associated with the item

◆ GetOrdinalValue()

_.Library.String GetOrdinalValue (   pCell)
private

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.

◆ GetPlan()

_.Library.Status GetPlan (   pPlan)
private

Utility method.


Assemble the query plan for this query. The query must have been successfully executed.

◆ GetQuery()

_.DeepSee.Query.query GetQuery ( )
private

Return the DeepSee run-time query object currently in use.

as the source for this result set.

◆ GetQueryKey()

_.Library.String GetQueryKey ( )
private

Return the current Query Key for this Result Set.

The result set must be prepared before calling this.

◆ GetQueryStatus()

_.Library.Integer GetQueryStatus ( _.Library.String  pCubeName,
_.Library.String  pQueryKey,
_.Library.Double  pPercentComplete,
_.Library.Status  pSC,
_.Library.Boolean  pPendingResults 
)
staticprivate

Given a cube name and a query key (as returned by the <method>ExecuteAsync</method>)

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.

◆ GetQueryText()

_.Library.String GetQueryText ( )
private

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.

◆ GetRowTotal()

_.Library.String GetRowTotal ( _.Library.Integer  pRow,
_.Library.String  pAgg 
)
private

Get the total associated with the given row (1-based).


◆ GetSlicerForCellRange()

_.Library.Status GetSlicerForCellRange ( _.Library.String  pSlicer,
_.Library.Integer  pStartRow,
_.Library.Integer  pStartCol,
_.Library.Integer  pEndRow,
_.Library.Integer  pEndCol,
_.Library.String  pMeasure 
)
private

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.

◆ GetStatistic()

_.Library.String GetStatistic ( _.Library.String  pStat)
private

Get the value of a specific query statistic.

e.g. "ParseMDX".

For "query" stats, add "query." to the stat name: e.g. ""query.Slices".

◆ GetValue()

_.Library.String GetValue (   pNode)
private

Get the value of the cell specified by the node numbers.

pNode1, pNode2...

◆ InitializeResultSet()

_.Library.Status InitializeResultSet ( )
private

Initialize this resultset to ready it for executing a new query.

This may be called on a newly instantiated

ResultSet or on a ResultSet that has already been used to execute a different MDX query.

◆ OnClose()

_.Library.Status OnClose ( )

This callback method is invoked by the <METHOD>Close</METHOD> method to.

provide notification that the current object is being closed.

The return value of this method is ignored.

Reimplemented from RegisteredObject.

◆ ParseMDX()

_.Library.Status ParseMDX ( _.Library.String  pMDX,
_.DeepSee.Query.query  pQuery 
)
private

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.

◆ PrepareKey()

_.Library.Status PrepareKey ( _.Library.String  pCubeName,
_.Library.String  pQueryKey,
  pParms,
_.Library.String  pOriginalMDX 
)
private

Given a DeepSee query key, pQueryKey,.

(returned by a previous query prepare), restore the state of the query so that it can be executed.

◆ PrepareMDX()

_.Library.Status PrepareMDX ( _.Library.String  pMDX,
  pVariables,
  pResolvedMDX 
)
private

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.
pVariables is an optional list of pivot variable names and their current values. These are substituted for any pivot variable references within the query before it is parsed.
pResolvedMDX is the query text after any pivot variable references have been resolved.

◆ PrepareObject()

_.Library.Status PrepareObject ( _.DeepSee.Query.query  pQuery,
  pVariables 
)
private

Given a DeepSee run-time query, pQuery,.

prepare it so that it can then be executed.

◆ Print()

_.Library.Status Print (   pStats,
_.Library.Boolean  pShowNodeNo,
_.Library.Integer  pMaxRows 
)
private

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.

◆ PrintListing()

PrintListing ( )
private

Utility method.


For a DRILLTHROUGH query, print out the listing.

◆ RunQueryAuditCode()

_.Library.Status RunQueryAuditCode ( _.DeepSee.Query.query  pQuery)
private

Run the query audit code.

(Test version).

This gives customer applications a chance to audit the queries run by DeepSee. This is called whenever a query is executed by DeepSee.ResultSet.
The query audit code is a valid ObjectScript expression stored in the ^DeepSee.AuditQueryCode global. Audit query code should not write any output to the current device nor should this code kill any % variables required by Zen or DeepSee.
The variable, dsQuery, will contain the text of the query.

◆ SetAncestorLockKeys()

_.Library.Status SetAncestorLockKeys (   pAncestorLocks)
private

Fill the <property>AncestorLockKeys</property> array for the current ResultSet using the named lock keys defined in.

pAncestorLocks. This method will support a key set supplied as a comma-delimited string, a $LB, or a COS array.
When taking out locks in <method>AcquireLocks</method> it will be assumed any locks present in this array are held by a waiting parent process and so these particular locks will be exempted.

◆ SetLockKeys()

_.Library.Status SetLockKeys (   pRefreshKeys,
  pWait 
)
private

Fill the <property>LockKeys</property> array for the current query.

This will only succeed

if the query has been prepared. Keys will be prepended with either "results" or "axis" to indicate whether the particular key applies to the Results cache or the Axis cache, respectively. This does not do the actual work of acquiring locks.
Once the locks are determined they are immediately copied to the current Query object using <method>CopyLockKeysToQuery</method>. The value of the pWait flag is passed through to this method to maintain proper tracking of the lock hierarchy.

◆ SetLockMode()

_.Library.Status SetLockMode (   pType)
private

Accessor method for changing the <property>LockMode</property> of this ResultSet.

This is protected from changing the mode when locks are engaged.

◆ SetParameterContext()

_.Library.Status SetParameterContext (   pContext)
private

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.

◆ SetSubqueryResultset()

_.Library.Integer SetSubqueryResultset ( _.DeepSee.ResultSet  pRS,
_.Library.Status  pStatus 
)
private

Add a subquery resultset to the list of objects needed to complete this query.

Returns zero if there was a failure to set the resultset into the list. Returns the index of the resutlset in the array when successful.

◆ ShowPlan()

ShowPlan ( )
private

Utility method.


Print out the plan for this query to the console. The query must have been successfully executed.

◆ UpdatePendingResults()

_.Library.Status UpdatePendingResults ( _.Library.Boolean  pPending)
private

If the given query has pending results (such as from plug-ins), update them.

Return if there are any additional pending results.

Member Data Documentation

◆ listing

listing

If set, this is the name of a listing within the current cube to use for detail listings.

 

◆ listingFormatList

listingFormatList

Formatting string to apply to listing results.

 

◆ listingPage

listingPage

Current "page" of listing query.

 

◆ listingPageSize

listingPageSize

Number of rows within a listing query "page".

 

◆ listingRows

listingRows

Number of rows in the current listing query.