Documentation ¶
Overview ¶
Package aggregate for measure aggregate function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments[A, B Input] struct { // contains filtered or unexported fields }
Arguments represents the argument array, with one argument or two arguments.
func NewAvgArguments ¶
NewAvgArguments constructs arguments.
func NewMinArguments ¶
NewMinArguments constructs arguments.
type Avg ¶
Avg calculates the average value of elements.
type Function ¶
type Function[A, B Input, R Output] interface { // Combine takes elements to do the aggregation. // It uses a two-dimensional array to represent the argument array. Combine(arguments Arguments[A, B]) error // Result gives the result for the aggregation. Result() R }
Function describes two stages of aggregation.
func NewFunction ¶
NewFunction constructs the aggregate function with given kind and parameter types.
type Input ¶
Input covers possible types of Function's arguments. It synchronizes with `FieldType` in schema.
type Min ¶
Min calculates the minimum value of elements.
Click to show internal directories.
Click to hide internal directories.