Packages

o

org.mongodb.scala.model

Accumulators

object Accumulators

Builders for accumulators used in the group pipeline stage of an aggregation pipeline.

Since

1.0

See also

Expressions

Accumulators

Aggregation pipeline

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Accumulators
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def addToSet[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing all unique values that results from applying the given expression to each document in a group of documents that share the same group by key.

    Gets a field name for a $group operation representing all unique values that results from applying the given expression to each document in a group of documents that share the same group by key.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $addToSet

  2. def avg[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the average of the values of the given expression when applied to all members of the group.

    Gets a field name for a $group operation representing the average of the values of the given expression when applied to all members of the group.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $avg

  3. def first[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the value of the given expression when applied to the first member of the group.

    Gets a field name for a $group operation representing the value of the given expression when applied to the first member of the group.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $first

  4. def last[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the value of the given expression when applied to the last member of the group.

    Gets a field name for a $group operation representing the value of the given expression when applied to the last member of the group.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $last

  5. def max[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the maximum of the values of the given expression when applied to all members of the group.

    Gets a field name for a $group operation representing the maximum of the values of the given expression when applied to all members of the group.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $max

  6. def min[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the minimum of the values of the given expression when applied to all members of the group.

    Gets a field name for a $group operation representing the minimum of the values of the given expression when applied to all members of the group.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $min

  7. def push[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing an array of all values that results from applying an expression to each document in a group of documents that share the same group by key.

    Gets a field name for a $group operation representing an array of all values that results from applying an expression to each document in a group of documents that share the same group by key.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $push

  8. def stdDevPop[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the sample standard deviation of the values of the given expression when applied to all members of the group.

    Gets a field name for a $group operation representing the sample standard deviation of the values of the given expression when applied to all members of the group.

    Use if the values encompass the entire population of data you want to represent and do not wish to generalize about a larger population.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    Since

    1.1

    Note

    Requires MongoDB 3.2 or greater

    See also

    $stdDevPop

  9. def stdDevSamp[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the sample standard deviation of the values of the given expression when applied to all members of the group.

    Gets a field name for a $group operation representing the sample standard deviation of the values of the given expression when applied to all members of the group.

    Use if the values encompass a sample of a population of data from which to generalize about the population.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    Since

    1.1

    Note

    Requires MongoDB 3.2 or greater

    See also

    $stdDevSamp

  10. def sum[TExpression](fieldName: String, expression: TExpression): BsonField

    Gets a field name for a $group operation representing the sum of the values of the given expression when applied to all members of the group.

    Gets a field name for a $group operation representing the sum of the values of the given expression when applied to all members of the group.

    TExpression

    the expression type

    fieldName

    the field name

    expression

    the expression

    returns

    the field

    See also

    $sum