Release 2.10.0
Added support for Aggregations and GroupLimit attribute in GroupBy clause.
Example:
var query = new CamlBuilder()
.View([
"ID",
{ count: "Country" },
{ avg: "FlightCost" }
])
.Query()
.GroupBy("Country", true, 100)
.ToString()
results in the following CAML:
<View>
<ViewFields>
<FieldRef Name="ID" />
</ViewFields>
<Aggregations Value="On">
<FieldRef Name="Country" Type="COUNT" />
<FieldRef Name="FlightCost" Type="AVG" />
</Aggregations>
<Query>
<GroupBy Collapse="TRUE" GroupLimit="100">
<FieldRef Name="Country" />
</GroupBy>
</Query>
</View>
Note: Aggregations should be used with RenderListData endpoint.