PostgreSQL · Types · Queries
ArxAggregateInfo
Definition
- Namespace
ARX.SDK.Query- Package
ARX.SDK
public class ArxAggregateInfoAggregates and group by for RetrieveMultiple: each aggregate column has an alias, an attribute and an operator (ArxAggregateOperator); the group-by columns are listed apart.
Constructor
ArxAggregateInfo()An empty aggregate: add columns with AddAggregateColumn and group-by columns with AddGroupByColumn.
Properties
List<ArxAggregateColumn> AggregateColumns { get; set; }The aggregate columns: each has an alias (its name in the result), an attribute and an operator.
List<string> GroupByColumns { get; set; }The columns the rows are grouped by. Each one is also returned in the result.
Methods
void AddAggregateColumn(ArxAggregateColumn column)Adds an aggregate column (an alias, the attribute and the operator).
Parameter Type Description columnArxAggregateColumnThe aggregate: its alias, column and operator. void AddAggregateColumn(string aliasName, string attributeName, ArxAggregateOperator aggregateOperator)Adds an aggregate column:
aliasNameis the name the result holds the value under.Parameter Type Description aliasNamestringThe attribute the result is read into, on each group's record. attributeNamestringThe column to aggregate ( alias.columnfor a link's); empty for a Count of rows.aggregateOperatorArxAggregateOperatorThe aggregate: Count, CountDistinct, Sum, Avg, Min, Max and the others. void AddGroupByColumn(string column)Groups the aggregates by this attribute.
Parameter Type Description columnstringThe column to group by ( alias.columnfor a link's); each group's record carries it.void AddGroupByColumns(params string[] columns)Groups the aggregates by these attributes, in order.
Parameter Type Description columnsparams string[]The columns to group by, in order ( alias.columnfor a link's).
Usage
A line from a verified sample; the full, runnable code is on its page.
var query = new ArxQueryExpression("contact") { AggregateInfo = new ArxAggregateInfo() };Read your own writes in an ARX transaction, scenario 2
Used in: