aggregator

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package aggregator is a utility package to create basic aggregators. Min/Max/Average aggregators are type specific, so an integerAvg() aggregator expects all elements to be integers. There is no conversion executed while accumulating on the server side, so if there is any other type met an exception will be thrown on the server side.

The attributePath given in the factory method allows the aggregator to operate on the value extracted by navigating to the given attributePath on each object that has been returned from a query. The attribute path may be simple, e.g. "name", or nested "address.city". The given attribute path should not be empty, otherwise an error will be returned from client side.

Server version should be at least 3.8.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(attributePath string) (*aggregation.Count, error)

Count returns a Count aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func FixedPointSum

func FixedPointSum(attributePath string) (*aggregation.FixedPointSum, error)

FixedPointSum returns a FixedPointSum aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Float64Average

func Float64Average(attributePath string) (*aggregation.Float64Average, error)

Float64Average returns a Float64Average aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Float64Sum

func Float64Sum(attributePath string) (*aggregation.Float64Sum, error)

Float64Sum returns a Float64Sum aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func FloatingPointSum

func FloatingPointSum(attributePath string) (*aggregation.FloatingPointSum, error)

FloatingPointSum returns a FloatingPointSum aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Int32Average

func Int32Average(attributePath string) (*aggregation.Int32Average, error)

Int32Average returns a Int32Average aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Int32Sum

func Int32Sum(attributePath string) (*aggregation.Int32Sum, error)

Int32Sum returns a Int32Sum aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Int64Average

func Int64Average(attributePath string) (*aggregation.Int64Average, error)

Int64Average returns a Int64Average aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Int64Sum

func Int64Sum(attributePath string) (*aggregation.Int64Sum, error)

Int64Sum returns a Int64Sum aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Max

func Max(attributePath string) (*aggregation.Max, error)

Max returns a Max aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

func Min

func Min(attributePath string) (*aggregation.Min, error)

Min returns a Min aggregator that counts the input values from the given attribute path. The given attribute path should not be empty, otherwise an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL