Home Reference Source
import {Aggregation} from './core/aggregation.js'
public class | source

Aggregation

Static Method Summary

Static Public Methods
public static

average(field: string): *

public static

count(field: string): *

public static

max(field: string): *

public static

min(field: string): *

public static

sum(field: string): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

initial: *

public set
public

key: *

public get

query: *

public set
public get
public set

Method Summary

Public Methods
public

by(field: *): *

public

process(entities: *[]): *

public

toPlainObject(): {"key": *, "initial": *, "reduce": *, "reduceFn": *, "condition": *, "query": *}

Static Public Methods

public static average(field: string): * source

Params:

NameTypeAttributeDescription
field string
  • optional
  • default:

Return:

*

public static count(field: string): * source

Params:

NameTypeAttributeDescription
field string
  • optional
  • default:

Return:

*

public static max(field: string): * source

Params:

NameTypeAttributeDescription
field string
  • optional
  • default:

Return:

*

public static min(field: string): * source

Params:

NameTypeAttributeDescription
field string
  • optional
  • default:

Return:

*

public static sum(field: string): * source

Params:

NameTypeAttributeDescription
field string
  • optional
  • default:

Return:

*

Public Constructors

public constructor() source

Public Members

public get initial: * source

public set initial source

public key: * source

public get query: * source

public set query source

public get reduceFn: * source

public set reduceFn source

Public Methods

public by(field: *): * source

Params:

NameTypeAttributeDescription
field *

Return:

*

public process(entities: *[]): * source

Params:

NameTypeAttributeDescription
entities *[]
  • optional
  • default: []

Return:

*

public toPlainObject(): {"key": *, "initial": *, "reduce": *, "reduceFn": *, "condition": *, "query": *} source

Return:

{"key": *, "initial": *, "reduce": *, "reduceFn": *, "condition": *, "query": *}