Performs a pivot query against the database, returning an array of arrays of PivotItems, grouped by a particular field.
More...
|
| __construct ($base, $baseConstraint="", $groupBy="") |
|
| groupBy ($groupBy) |
| Set the field by which results should be grouped. More...
|
|
| execute () |
|
| __construct ($base, $baseConstraint="") |
| Constructs a new AbstractPivotQuery. More...
|
|
| pivot ($pivotClass, $pivotConstraint, $pivotFunction="SUM") |
| Adds the pivot to the query. More...
|
|
| range ($rangeClass, $rangeConstraint) |
| Adds the range to the query. More...
|
|
| field ($field, $alias="", $type=String) |
| Adds a fixed field to the output object. More...
|
|
| pivotField ($format, $value, $alias=null, $expression="SUM", $type=Number) |
| Adds a pivot field format to the output object. More...
|
|
| createPivotItem () |
| Creates an empty PivotItem, configured with fields and field aliases based on the pivot and range. More...
|
|
| additionalFields () |
| Register additional fields from the base to be included in the PivotItem output. More...
|
|
| constraints ($constraints) |
| Sets the constraint clause for the Query. More...
|
|
| filter ($filter) |
| Sets a filter to constrain the fields retrieved when the query is executed. More...
|
|
| params ($params) |
| Sets the bound parameters array. More...
|
|
| bind () |
| Binds placeholders to parameter values. More...
|
|
Performs a pivot query against the database, returning an array of arrays of PivotItems, grouped by a particular field.
If the indexing field has unique values, indexedQuery() might be more appropriate.
- Author
- andy
Definition at line 486 of file pivot.inc.