Xplain.Db.Selections

Xplain.Db.Selections(v)

Each query may consist of a number of selection statements. This class represents these selection statements as an array of instances of Xplain.Db.Selection

addSelection

addSelection()

add a Xplain.Db.Selection instance to this set of Selections.

Returns

{object} this instance

getSelection

getSelection(i)

returns the i-th Xplain.Db.Selection in the array of selections.

Parameters

i (int) – the index of the selection you want to be returned by this method

Returns

{Xplain.Db.Selection} the Xplain.Db.Selection

getSelections

getSelections()

returns an array of all Xplain.Db.Selection instances currently assigned to this Selections instance.

Warning

This method id deprecated! Use toArray instead.

Returns

{Array} of Xplain.Db.Selection instances

toArray

toArray()

returns an array of all Xplain.Db.Selection instances currently assigned to this Selections instance.

Returns

{Array} of Xplain.Db.Selection instances

toJson

toJson(q)

generates the framework for a set of Selection requests, send to the backend within a open/execute request

Parameters

q (Xplain.Db.Query | string) – The corresponding query or an attribute in notation OBJECT.DIMENSION.ATTRIBUTE

Returns

{Object} an object representing this selections ajax request.