SQL Server · Types · Queries

ArxAggregateInfo

Definition

Namespace
ARX.SDK.Query
Package
ARX.SDK
C#
public class ArxAggregateInfo

Aggregates 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: aliasName is 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.column for 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.column for 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.column for a link's).

Usage

C#

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: