Xplain.Db.GroupBys
- Xplain.Db.GroupBys(v)
Each query may consist of a number of groupBy statements. This class represents these groupBy statements as an array of instances of Xplain.Db.GroupBy.
addGroupBy
- addGroupBy()
add a Xplain.Db.GroupBy instance to this set of GroupBys.
- Returns
{object} this
findByAttribute
- findByAttribute(attrName)
find the groupBy within this set of groupBys where the attribute name equals attrName
- Parameters
attrName (string) – Name of the attribute you are looking for
- Returns
{Xplain.Db.GroupBy|boolean} the Xplain.Db.GroupBy or false
getGroupBys
- getGroupBys()
returns an array of all Xplain.Db.GroupBy instances currently assigned to this GroupBys instance.
Warning
This method id deprecated! Use toArray instead.
- Returns
{Array} of Xplain.Db.GroupBy instances
toArray
- toArray()
returns an array of all Xplain.Db.GroupBy instances currently assigned to this GroupBys instance.
- Returns
{Array} of Xplain.Db.GroupBy instances
toJson
- toJson(q)
generates the framework for a set of groupBy requests, send to the backend within a open/execute request
- Parameters
q (Xplain.Db.Query) – the corresponding query
- Returns
{Object} an object representing this groupBy’s ajax request.
toString
- toString()
converts this set of groupBys to a string which reflects the definition of this set.
- Returns
{string} the definition of this set of groupBys as string