Home > Class Reference > ENSLIB namespace > %ZEN.Auxiliary.jsonMDXProvider

%ZEN.Auxiliary.jsonMDXProvider

class %ZEN.Auxiliary.jsonMDXProvider extends %ZEN.Auxiliary.altJSONProvider, %DeepSee.Component.pivotTable

A version of the JSON provider that can use an MDX query or the full name of a stored pivot table to supply data that is served to the client in JSON format. This can be used in the same manner as the jsonProvider component.
For example, placing this within your page definition:
<jsonMDXProvider id="mdxProvider" mdxQuery="SELECT FROM HOLEFOODS"/>
would cause the given MDX statement to execute when the page is requested and the results of the query to be written to the page in JSON format:
o.content = {
		"AxesInfo": {
		},
		"Info": {
			"ColCount":0,
			"Cube":"HOLEFOODS",
			"CubeKey":"HOLEFOODS",
			"Error": {
				"ErrorCode":"",
				"ErrorMessage":""
			},
			"ListingSource":"",
			"MDXText":"SELECT FROM HOLEFOODS",
			"QueryKey":"en558256763",
			"QueryType":"SELECT",
			"ResultsComplete":1,
			"RowCount":0,
			"TimeStamp":"2015-05-12 13:23:58"
		},
		"Result": {
			"Axes":[
			],
			"CellData":[ {
					"%ID":"Cell_1",
					"Format":"",
					"ValueFormatted":"1,000",
					"ValueLogical":1000
				}
			]
		}
	};
The JSON content object will contain three major branches AxesInfo, Info, and Result, each of which contain an array of objects that correspond to query structure, metadata, and actual results as returned by the MDX statement.
If you need more control over the MDX query, you can use the OnGetMDX callback method.
This component ignores all of the data source callback methods inherited from the jsonProvider class.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property OnCreateResultSet as %ZEN.Datatype.delegator (FORMALSPEC = "*tSC:%Status,&pParms:%String", RETURNTYPE = "%DeepSee.ResultSet");
(optional) Name of Server-side callback method to call to create a %DeepSee.ResultSet object.
This must be the name of a server-only method in the page class that contains this component.
Property methods: OnCreateResultSetDisplayToLogical(), OnCreateResultSetGet(), OnCreateResultSetIsValid(), OnCreateResultSetLogicalToDisplay(), OnCreateResultSetLogicalToOdbc(), OnCreateResultSetNormalize(), OnCreateResultSetSet()
property OnExecuteResultSet as %ZEN.Datatype.delegator (FORMALSPEC = "pRS:%DeepSee.ResultSet,*tSC:%Status,&pParms:%String", RETURNTYPE = "%Boolean");
(optional) Name of Server-side callback method to call to execute the %DeepSee.ResultSet object.
This must be the name of a server-only method in the page class that contains this table pane.
Property methods: OnExecuteResultSetDisplayToLogical(), OnExecuteResultSetGet(), OnExecuteResultSetIsValid(), OnExecuteResultSetLogicalToDisplay(), OnExecuteResultSetLogicalToOdbc(), OnExecuteResultSetNormalize(), OnExecuteResultSetSet()
property OnGetMDX as %ZEN.Datatype.delegator (FORMALSPEC = "&pParameters:%String,&pMDX:%String,pCriteria:%ZEN.proxyObject,&pPagingInfo:%String", RETURNTYPE = "%Status");
This specifies a callback method that returns an MDX query (string) that will drive this provider. This is identical in behavior to (and replaces) the mdx property. The method can make it easier to create queries based on parameter values or search criteria passed via the criteria property.
Property methods: OnGetMDXDisplayToLogical(), OnGetMDXGet(), OnGetMDXIsValid(), OnGetMDXLogicalToDisplay(), OnGetMDXLogicalToOdbc(), OnGetMDXNormalize(), OnGetMDXSet()
property cubeKey as %ZEN.Datatype.string;
If defined along with queryKey, the provider can prepare a resultset of a query already in progress.
Property methods: cubeKeyDisplayToLogical(), cubeKeyGet(), cubeKeyIsValid(), cubeKeyLogicalToDisplay(), cubeKeyLogicalToOdbc(), cubeKeyNormalize(), cubeKeySet()
property mdxQuery as %ZEN.Datatype.string;
If defined, the provider can generate JSON results from MDX query text
Property methods: mdxQueryDisplayToLogical(), mdxQueryGet(), mdxQueryIsValid(), mdxQueryLogicalToDisplay(), mdxQueryLogicalToOdbc(), mdxQueryNormalize(), mdxQuerySet()
property pivotTable as %ZEN.Datatype.string;
If defined, the provider can generate JSON results from a stored pivot definition
Property methods: pivotTableDisplayToLogical(), pivotTableGet(), pivotTableIsValid(), pivotTableLogicalToDisplay(), pivotTableLogicalToOdbc(), pivotTableNormalize(), pivotTableSet()
property queryKey as %ZEN.Datatype.string;
If defined along with cubeKey, the provider can prepare a resultset of a query already in progress.
Property methods: queryKeyDisplayToLogical(), queryKeyGet(), queryKeyIsValid(), queryKeyLogicalToDisplay(), queryKeyLogicalToOdbc(), queryKeyNormalize(), queryKeySet()
property recordCount as %ZEN.Datatype.integer;
If the provider is using server-side data paging, this is the total number of records.
Property methods: recordCountDisplayToLogical(), recordCountGet(), recordCountIsValid(), recordCountLogicalToDisplay(), recordCountLogicalToOdbc(), recordCountNormalize(), recordCountSet()

Methods (Including Private)

method %ConstructNewDynamicArray() as %DynamicArray