public final class Accumulators
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <TExpression> |
addToSet(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
avg(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
first(java.lang.String fieldName,
TExpression expression)
Gets a field name for a $group operation representing the value of the given expression when applied to the first member of
the group.
|
static <TExpression> |
last(java.lang.String fieldName,
TExpression expression)
Gets a field name for a $group operation representing the value of the given expression when applied to the last member of
the group.
|
static <TExpression> |
max(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
min(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
push(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
stdDevPop(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
stdDevSamp(java.lang.String fieldName,
TExpression expression)
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.
|
static <TExpression> |
sum(java.lang.String fieldName,
TExpression expression)
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.
|
public static <TExpression> BsonField sum(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField avg(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField first(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField last(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField max(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField min(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField push(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField addToSet(java.lang.String fieldName, TExpression expression)
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField stdDevPop(java.lang.String fieldName, TExpression expression)
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 typefieldName
- the field nameexpression
- the expressionpublic static <TExpression> BsonField stdDevSamp(java.lang.String fieldName, TExpression expression)
Use if the values encompass a sample of a population of data from which to generalize about the population.
TExpression
- the expression typefieldName
- the field nameexpression
- the expressionCopyright © 2010 - 2020 Adobe. All Rights Reserved