Pivoting a result set is the operation behind most management reports: periods across the top, categories down the side, a measure in each cell. The previous implementation handled one measure and one level of header. This release rewrites it.
Two shapes
- Standard One row of generated columns, as before, on a cleaner engine.
- Hierarchical Grouped column headers at several levels, the way a spreadsheet pivot shows year over quarter over month.
What a pivot can say
- Several measures More than one value column per pivot, each with its own aggregation: sum, average, count, minimum, maximum, first or last.
- Fluent options Pivot columns and values, explicit value combinations or automatic discovery, sorting, a column prefix and separator, suppression of repeating groups.
- Carried to the client The JSON form of a result set gains a multi-level headers array beside the legacy header field, and cursor tables render the grouped headers.
Six new test classes, around 4,500 lines, cover edge cases, type compatibility and performance, and the server-side JavaScript pivot calls moved to the new options.