Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GroupComputation

Defines the structure of grouped object computations. Basically, it provides aggregate calculation instructions to QueryBuilder.compute method

export
interface

GroupComputation

Hierarchy

  • GroupComputation

Index

Properties

expression: string

The computation expression string. Except count, expression string is required for all other computation types.

memberof

GroupComputation

name: string

The name of the computation which will be reported in the result of QueryBuilder.compute method execution. If you are defining more than one group computation, then their names need to be unique.

sort: "none" | "desc" | "asc"

Defines the sort direction of computed field. If sort direction is specified as either asc or desc, computed groups will be sorted accordingly.

memberof

GroupComputation

type: "max" | "min" | "count" | "countif" | "sum" | "avg"

Defines the type of the computation

  • count: Counts the number of objects in each group
  • countif: Counts the number of objects in each group based on the result of the specified expression. If the expression evaluates to true then they are counted otherwise not.
  • sum: Sums the evaluated expression values for each group member. The expression needs to return an integer or decimal value.
  • avg: Averages the evaluated expression values for the overall group. The expression needs to return an integer or decimal value.
  • min: Calculates the minimum value of the evaluated expression for the overall group. The expression needs to return an integer or decimal value.
  • max: Calculates the maximum value of the evaluated expression for the overall group. The expression needs to return an integer or decimal value.
memberof

GroupComputation

Generated using TypeDoc