class %DeepSee.Query.Parser
extends %RegisteredObject
Contains the DeepSee MDX query parser and related APIs.
This class contains no publicly accessible code.
property %Stack
as %Integer [ MultiDimensional ];
Context stack.
property Bookmark
as %Integer;
Current bookmark position within query text.
property CubeName
as %DeepSee.Datatype.entityName;
Cubename within the current query.
property InSearch
as %Boolean [ InitialExpression = 0 ];
Indicates the current tokens are within the %SEARCH context
property LastToken
as %String;
Most recently parsed token (used for error reporting).
property Position
as %Integer;
Current position within query text.
property Query
as %DeepSee.Query.query;
The query object this parser is constructing.
property Text
as %String;
Query text.
property Trace
as %Boolean [ InitialExpression = 0 ];
Debug flag.
classmethod %BuildEscapedSpec(pIdentifierList As %List, Output pStatus As %Status, pIncludeKey As %Boolean = 0)
as %String
Return a spec with escaped identifiers, translating each "]" into a
"]]" to escape the closing quote. The argument pIdentifierList
may be a list of any length. The method will terminate construction upon
encountering the first null entry in the list.
The pIncludeKey flag can be used to add a "&[]"-enclosed key as
the final pice of the spec generated from the pIdentifierList. By default the method
will asume no key is included in the list.
method %ParseWITH(pMode As %String = "with")
as %Status
Parse an MDX WITH statement.
If pMode is "with", then this is a WITH clause of a query;
If pMode is "set" or "member", then this is a CREATE statement;
method %ValidateText(pQuery As %DeepSee.Query.query = $$$NULLOREF, pText="")
as %Status
Perform initial checks on the MDX text itself to see if there are obvious errors that can be reported
without further processing.