Xplain.Db.Aggregations

Xplain.Db.Aggregations(v)

This class represents a set of Xplain.Db.Aggregation instances.

addAggregation

addAggregation(agg)

add a Xplain.Db.Aggregation instance to this set of Aggregations.

Parameters

agg (Xplain.Db.Aggregation) – the aggregation that should be added

Returns

{object} this instance

getAggregations

getAggregations()

returns an array of all Xplain.Db.Aggregation instances currently assigned to this Aggregations instance.

Warning

This method id deprecated! Use toArray instead.

Returns

{Array} of Xplain.Db.Aggregation instances

toArray

toArray()

returns an array of all Xplain.Db.Aggregation instances currently assigned to this Aggregations instance.

Returns

{Array} of Xplain.Db.Aggregation instances

toJson

toJson(q)

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

Parameters

q (Xplain.Db.Query) – the corresponding query

Returns

{Object} an object representing this aggregation’s ajax request.

toString

toString()

converts this set of aggregations to a string which reflects the definition of this set.

Returns

{string} the definition of this set of aggregations as string