| This class is used for grouping select results, especially for select
statements that include group by clause and nested aggregate functions.
It is used by the Select class regardless the existence of group by
clause.
When a group by clause is defined, a ResultGroup is used to hold
all column values and AggregatingValues for each group. When a group
by clause is not defined, one ResultGroup is used to hold all the
results.
All ResultGroups are placed in a HashSet. Adding a new row
will first retrieve the corresponding group from the table, based on the
values in the group by columns. If a group is found, then the row
associated with the group will be returned. Otherwise a new group is
created with the new row, and the new row is returned.
The Select can then update the values and AggregatingValues
in the returned row, rather than the original row. This approach enables
nested aggregate functions, such as "count(id)+2, 20-count(id),
max(id)-min(id)" support.
author: Tony Lai version: 1.7.2 since: 1.7.2 See Also: Expression See Also: Select |