AggregateGroup class
namespace: Serenity.Services assembly: Serenity.Net.Services
The aggregates of a list request for a set of rows: all the rows the request matches at the root, see Aggregates, and the rows of a group under it, one level for each GroupBy. They are calculated from all the rows, and not from the page that is returned.
public class AggregateGroup
Public Members
| name | description |
|---|---|
| AggregateGroup() | The default constructor. |
| Count { get; set; } | The number of the rows. |
| Groups { get; set; } | The groups of the next level, in their order. It is null for a group of the last level, and at the root when the rows are not grouped, which is also when they are asked to be, but can't. |
| Key { get; set; } | The value of the group field for the rows of the group, as it is in the entities, so a row can be matched to its group. It is null at the root, and for the group of the rows whose field is null. |
| More { get; set; } | True when there are more groups than the ones in Groups, as their number is limited. The values of this group are still of all of its rows. |
| Values { get; set; } | The values of the aggregates, by the key of their type, see GetKey, then by the name of their field, e.g. Values["sum"]["Freight"], as the totals of a grid are. An aggregate that is not calculated, e.g. as its field can't be, is left out. The count without a field is only in Count. |
| const AvgKey | The key of Values for Avg. |
| const CountKey | The key of Values for Count. |
| const DistinctCountKey | The key of Values for DistinctCount. |
| const MaxKey | The key of Values for Max. |
| const MinKey | The key of Values for Min. |
| const SumKey | The key of Values for Sum. |
| static GetKey(…) | Gets the key of Values for an aggregate type, which are the ones of the aggregators of the grids for the types they have. |
See Also
- Source: AggregateGroup.cs