IRISLIB database
query Class Reference

This class holds run-time information for a DeepSee MDX statement and provides the machinery to prepare and execute it (via the <class>DeepSee.ResultSet</class> interface. More...

Inheritance diagram for query:
Collaboration diagram for query:

Public Attributes

 axes
 Axes defined for this query. More...
 
 calculatedMembers
 Collection of Calculated Members defined within the WITH clause of the query. More...
 
 compoundDrillthroughs
 For DRILLTHROUGH queries on compound cubes, this is the MDX DRILLTHROUGH statements for each leg. More...
 
 compoundQueries
 For queries on compound cubes, this is the set of keys for the subqueries that have to be executed. More...
 
 cube
 Name of the cube this query is based on. More...
 
 filterAxis
 Used to hold cube/subjectArea level filter. More...
 
 filters
 Filter(s) defined for this query. More...
 
 measureAxis
 Used as an indicator as to which axis supplies the measure information for this query. More...
 
 namedSets
 Collection of Named Sets defined within the WITH clause of the query. More...
 
 parentCube
 Contains the parent cube name if query is a member of a subquery. More...
 
 parentQueryKey
 For subqueries, remember which parent query initiated it. More...
 
 queryType
 This indicates what type of MDX statement this is. More...
 
 recompute
 If true recompute previously run queries whose data has been updated. More...
 
 showPlan
 If true, execute this query in "plan" mode. More...
 
 slicer
 Slicer defined for this query. More...
 
 subqueries
 Collection of all subqueries associated with this query. More...
 
 useAgents
 If true, execute using background agents. More...
 
 useCache
 If true, then use results caching for this query. More...
 
- Public Attributes inherited from node
 parent
 Parent of this node. More...
 
 value
 Value of this node. More...
 

Private Member Functions

 ClearStatistics ()
 Clear out current statistics for this query.
 
_.Library.Status CompleteAxes ()
 Make sure this query has an executable set of axes. More...
 
_.Library.String CreateAxisKey (_.Library.Status pStatus, pType, _.DeepSee.Query.axis pAxis, pOriginalSpec, pFinalText, _.Library.Boolean pRefreshKey)
 Generate an axis key for a DeepSee.Query.axis object.
 
_.Library.String CreateResultKey (_.Library.Status pStatus, pFinalText, _.Library.Boolean pRefreshKey, _.Library.String pMDXRequest)
 Generate the result key for the current query object.
 
_.Library.Status CreateSubQueryResultSet (_.Library.String pMDX, _.DeepSee.ResultSet pRS, _.Library.Boolean pSkipWITH)
 Create and prepare a result set for a subquery within this query.
 
_.Library.Status ExecuteAsynch (_.Library.Boolean pWait, _.Library.String pTaskGroupId, _.Library.Boolean pAxesOnly, _.Library.String pAxisQuery, pParms)
 Execute this query using background agents. More...
 
_.Library.Status ExecuteParameters (pParms)
 Apply the set of named parameters values to this query and. More...
 
_.Library.Status GetCalculatedMembers (_.Library.String pDimName, _.Library.String pList)
 Find the list of calculated members in the given dimension. More...
 
_.Library.Status GetParameterInfo (pParms)
 Return the set of named parameters values defined by this query.
 
_.Library.Status GetSubQuery (_.Library.Integer pKey, _.DeepSee.ResultSet pRS)
 Retrieve a ResultSet from the set of registered subqueries.
 
_.Library.Status HasOrder (pMember, pHasOrder, pGroup)
 Check if pMember has an ORDER() function in it (or in one of its children).
 
_.Library.Status HasSubsetFunction (pMember, pGroup, pHasSubsetFunction)
 Check if a given group has a subset function (HEAD, TAIL, SUBSET) in it and,. More...
 
_.Library.Boolean IsExecutable (pStatus, _.Library.String pReason)
 Test the current query object for enabled dimensions, measures, and relationships as aplicable. More...
 
_.Library.Boolean LookupCalculatedMember (_.Library.String pMemberSpec, _.Library.Integer pCount, _.DeepSee.Query.set pSet, _.Library.Status pSC, _.Library.Boolean pIsFunc, _.Library.Boolean pUseKey)
 See if the specified calculated member is defined. More...
 
_.Library.Boolean LookupNamedSet (_.Library.String pName, _.DeepSee.Query.set pSet, _.Library.Status pSC)
 See if the specified named set is defined. More...
 
_.Library.Status PreProcessQuery ()
 Execute the pre-processing logic for this node.
 
_.Library.Status Prepare ()
 Prepare this query. More...
 
 PrintNode (_.Library.Integer pLevel)
 Diagnostic. More...
 
 PrintStatistics ()
 Write out current statistics for this query.
 
_.Library.Status RegisterSubQuery (_.Library.String pMDX, _.Library.Integer pKey, _.DeepSee.Query.axis pAxis, _.Library.Boolean pSkipWITH)
 Add the given subquery to the list of subqueries and return its key (for subsequent lookup).
 
_.Library.Status RewriteForOrder (_.DeepSee.Query.axis pAxis, _.DeepSee.Query.axis pOppAxis)
 Rewrite a group if necessary to sort the members of pOppAxis.
 
_.Library.String ToString (_.Library.Status pSC)
 Convert this node to its text representation.
 
_.Library.String WITHToString ()
 Convert the WITH clause for this query (named sets and calculated members) to a canonic text representation.
 

Static Private Member Functions

_.Library.Status AddLabel (_.DeepSee.Query.group pReferenceGroup, _.DeepSee.Query.group pLabel, _.DeepSee.Query.group pLabeledGroup)
 Add a LABEL to pReferenceGroup. More...
 
_.Library.Boolean IsAggFunc (_.Library.String pFunc)
 Test if pFunc is an aggregate function.
 
_.Library.Status NullifyAxis (pAxisKey)
 Set the axis to a literal null.
 
_.Library.Status RemoveLabel (_.DeepSee.Query.group pReferenceGroup, _.DeepSee.Query.group pLabelGroup, _.DeepSee.Query.group pInnerGroup)
 Remove the LABEL and expose the group is is acting upon. More...
 
_.Library.Status ResolveVariablesInText (_.Library.String pMDX, pVariables)
 Resolve any instances of "$variable.Name" in the text pMDX using values in the lookup array. More...
 
_.DeepSee.Query.node RewriteNodeAsSubquery (pNode)
 Write the node as the columns clause in an MDX subquery.
 
_.Library.Status TestSubQueryCache (_.Library.String pCubeName, _.Library.String pQueryKey, _.Library.String pTimestamp, _.Library.Boolean pCurrent, _.Library.String pQueryCube)
 Given a cube, subquery key, and timestamp, determine if there. More...
 

Additional Inherited Members

- 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 OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. 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 Member Functions inherited from Adaptor
_.Library.Status XMLExport (_.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent, _.Library.Boolean local, _.Net.MIMEPart mimeAttachments)
 Serialize an XML enabled class as an XML document and write. More...
 
_.Library.Status XMLExportToStream (_.Stream.Object export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and appends it to a stream. More...
 
_.Library.Status XMLExportToString (_.Library.String export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and write it to a string. More...
 
- Static Public Member Functions inherited from Adaptor
_.Library.Status XMLDTD (_.Library.String top, _.Library.String format, _.Library.Boolean input, dtdlist)
 Write the DTD to the current device for this XML enabled class serialized as. More...
 
_.Library.RegisteredObject XMLNew (_.XML.Document document, _.Library.Integer node, _.Library.RegisteredObject containerOref)
 Get an instance of an XML enabled class. More...
 
_.Library.Status XMLSchema (_.Library.String top, _.Library.String format, _.Library.String namespacePrefix, _.Library.Boolean input, _.Library.Boolean refOnly, schema)
 Write an XML Schema fragment to the current device which describes an XML enabled class and dependent classes. More...
 
_.Library.String XMLSchemaNamespace ()
 Get the namespace to which this class belongs for use in schema generation. More...
 
_.Library.Status XMLSchemaType (_.XML.Schema schemaInstance, _.XML.Node node, _.Library.String top, _.Library.Boolean encoded, _.Library.Boolean summary, _.Library.Boolean input, _.Library.Boolean refOnly)
 Add a complexType to the schema that is respresented by an <class>XML.Schema</class> instance. 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...
 
- Static Public Attributes inherited from Adaptor
 ATTRIBUTEQUALIFIED = None
 ATTRIBUTEQUALIFIED controls the format of exported XML by controlling whether attributes. More...
 
 ELEMENTQUALIFIED = None
 ELEMENTQUALIFIED controls the format of exported XML. More...
 
 NAMESPACE = None
 NAMESPACE specifies the XML namespace to be used when projecting the. More...
 
 SUPPRESSTYPEPREFIX = None
 SUPPRESSTYPEPREFIX allows the type name that refers to this class. More...
 
 XMLDEFAULTREFERENCE = None
 XMLDEFAULTREFERENCE specifies the default value of the XMLREFERENCE property parameter. More...
 
 XMLENABLED = None
 If this parameter is true then XML-enabling methods. More...
 
 XMLFORMAT = None
 The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport. More...
 
 XMLIGNOREINVALIDATTRIBUTE = None
 The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNOREINVALIDTAG = None
 The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNORENULL = None
 XMLIGNORENULL allows the programmer to override the default XML handling. More...
 
 XMLINCLUDEINGROUP = None
 XMLINCLUDEINGROUP allows the programmer to control whether a class is included. More...
 
 XMLINHERITANCE = None
 If the XMLINHERITANCE parameter is set to "LEFT", then in the case of multiple. More...
 
 XMLNAME = None
 This parameter provides the default XMLNAME for the class. More...
 
 XMLNIL = None
 The XMLNIL class parameter controls the use of xsi:nil by XMLExport. More...
 
 XMLNILNOOBJECT = None
 The XMLNILNOOBJECT parameter allows creation of an object to be skipped for elements. More...
 
 XMLPREFIX = None
 The XMLPREFIX parameter controls the prefix to be used for the XML namespace that. More...
 
 XMLSEQUENCE = None
 If the XMLSEQUENCE = 1, then the order of the XML elements must match the. More...
 
 XMLSUMMARY = None
 The summary fields to be used when an object is referenced are specified. More...
 
 XMLTYPE = None
 This parameter provides the default XMLTYPE for the class. More...
 
 XMLUNSWIZZLE = None
 If the XMLUNSWIZZLE parameter is set to 1, then single object. More...
 
 XMLUSEEMPTYELEMENT = None
 If the XMLUSEEMPTYELEMENT parameter is set to 1, then the empty element shorthand (<tag>) More...
 

Detailed Description

This class holds run-time information for a DeepSee MDX statement and provides the machinery to prepare and execute it (via the <class>DeepSee.ResultSet</class> interface.

Member Function Documentation

◆ AddLabel()

_.Library.Status AddLabel ( _.DeepSee.Query.group  pReferenceGroup,
_.DeepSee.Query.group  pLabel,
_.DeepSee.Query.group  pLabeledGroup 
)
staticprivate

Add a LABEL to pReferenceGroup.

The label is supplied to the method as an abstracted

LABEL object pLabel. The input group is placed in the first argument of a LABEL which contains all the same parameters that are defined in pLabel. The newly labeled group is returned in pLabeledGroup.

◆ CompleteAxes()

_.Library.Status CompleteAxes ( )
private

Make sure this query has an executable set of axes.

Axes 0 and 1 (COLUMNS, ROWS)

are required, axis 2 is optional. If either Rows or Columns are missing, insert a placeholder SEARCH term

◆ ExecuteAsynch()

_.Library.Status ExecuteAsynch ( _.Library.Boolean  pWait,
_.Library.String  pTaskGroupId,
_.Library.Boolean  pAxesOnly,
_.Library.String  pAxisQuery,
  pParms 
)
private

Execute this query using background agents.


If pWait is true (1) then do not return until the background agents are finished.
If pWait is false, then pTaskGroupId will return the task group id used to execute the query.

◆ ExecuteParameters()

_.Library.Status ExecuteParameters (   pParms)
private

Apply the set of named parameters values to this query and.

then make sure the result cache is ready to accept values.

◆ GetCalculatedMembers()

_.Library.Status GetCalculatedMembers ( _.Library.String  pDimName,
_.Library.String  pList 
)
private

Find the list of calculated members in the given dimension.

Return a list of their names: pList(UNAME) = name

◆ HasSubsetFunction()

_.Library.Status HasSubsetFunction (   pMember,
  pGroup,
  pHasSubsetFunction 
)
private

Check if a given group has a subset function (HEAD, TAIL, SUBSET) in it and,.

if so, return the first such subgroup with output pGroup.

◆ IsExecutable()

_.Library.Boolean IsExecutable (   pStatus,
_.Library.String  pReason 
)
private

Test the current query object for enabled dimensions, measures, and relationships as aplicable.

If all items have completed a build process and contain queryable data, the query is executable.

◆ LookupCalculatedMember()

_.Library.Boolean LookupCalculatedMember ( _.Library.String  pMemberSpec,
_.Library.Integer  pCount,
_.DeepSee.Query.set  pSet,
_.Library.Status  pSC,
_.Library.Boolean  pIsFunc,
_.Library.Boolean  pUseKey 
)
private

See if the specified calculated member is defined.


pMemberSpec is an array of the names making up the member spec. pCount is the number of names to look at in the list. None of the names in the list should have [ ] characters around them.
If the last item in the list is the name of one of the few functions allowed on calculated dimensions, then pIsFunc is set.

◆ LookupNamedSet()

_.Library.Boolean LookupNamedSet ( _.Library.String  pName,
_.DeepSee.Query.set  pSet,
_.Library.Status  pSC 
)
private

See if the specified named set is defined.


pName should not have [ ] characters around it.

◆ Prepare()

_.Library.Status Prepare ( )
private

Prepare this query.


This is the first step in executing a query.

◆ PrintNode()

PrintNode ( _.Library.Integer  pLevel)
private

Diagnostic.

Print value of this node to the console.

Reimplemented from node.

◆ RemoveLabel()

_.Library.Status RemoveLabel ( _.DeepSee.Query.group  pReferenceGroup,
_.DeepSee.Query.group  pLabelGroup,
_.DeepSee.Query.group  pInnerGroup 
)
staticprivate

Remove the LABEL and expose the group is is acting upon.

The abstracted contents of the LABEL

are returned as the pLabelGroup.

◆ ResolveVariablesInText()

_.Library.Status ResolveVariablesInText ( _.Library.String  pMDX,
  pVariables 
)
staticprivate

Resolve any instances of "$variable.Name" in the text pMDX using values in the lookup array.

pVariables.

◆ TestSubQueryCache()

_.Library.Status TestSubQueryCache ( _.Library.String  pCubeName,
_.Library.String  pQueryKey,
_.Library.String  pTimestamp,
_.Library.Boolean  pCurrent,
_.Library.String  pQueryCube 
)
staticprivate

Given a cube, subquery key, and timestamp, determine if there.

is an up-to-date result cache for the query. Return true (1) if this is the case.
As a side effect, remove any out-of-date portions of the result cache for this query.

Member Data Documentation

◆ axes

axes

Axes defined for this query.

 

◆ calculatedMembers

calculatedMembers

Collection of Calculated Members defined within the WITH clause of the query.

These are indexed by Dimension.MemberName.  

◆ compoundDrillthroughs

compoundDrillthroughs

For DRILLTHROUGH queries on compound cubes, this is the MDX DRILLTHROUGH statements for each leg.

of the compound query.  

◆ compoundQueries

compoundQueries

For queries on compound cubes, this is the set of keys for the subqueries that have to be executed.

and then joined.  

◆ cube

cube

Name of the cube this query is based on.


This is the FROM clause of the query.  

◆ filterAxis

filterAxis

Used to hold cube/subjectArea level filter.

 

◆ filters

filters

Filter(s) defined for this query.


This is the ISC extension FILTER clause of the query.  

◆ measureAxis

measureAxis

Used as an indicator as to which axis supplies the measure information for this query.

The

slicer is denoted by a 0, other axes are logged as their 1-based number. A value of -1 for this property indicates the default measure will be used.  

◆ namedSets

namedSets

Collection of Named Sets defined within the WITH clause of the query.

 

◆ parentCube

parentCube

Contains the parent cube name if query is a member of a subquery.

 

◆ parentQueryKey

parentQueryKey

For subqueries, remember which parent query initiated it.

 

◆ queryType

queryType

This indicates what type of MDX statement this is.

 

◆ recompute

recompute

If true recompute previously run queries whose data has been updated.

otherwise return old values.  

◆ showPlan

showPlan

If true, execute this query in "plan" mode.


 

◆ slicer

slicer

Slicer defined for this query.


This is the WHERE clause of the query.
From a definition perspective this is no different than any other axis.  

◆ subqueries

subqueries

Collection of all subqueries associated with this query.

 

◆ useAgents

useAgents

If true, execute using background agents.


This is set when using async mode.  

◆ useCache

useCache

If true, then use results caching for this query.