public class GroupBy extends Object
| Constructor and Description |
|---|
GroupBy(String... keys) |
GroupBy(String key,
boolean isKeyFunction) |
| Modifier and Type | Method and Description |
|---|---|
GroupBy |
collation(Collation collation)
Define the Collation specifying language-specific rules for string comparison.
|
GroupBy |
finalizeFunction(String finalizeFunction)
Define the function that runs each item in the result set before db.collection.group() returns the final value.
|
org.bson.Document |
getGroupByObject()
Get the
Document representation of the GroupBy. |
GroupBy |
initialDocument(org.bson.Document initialDocument)
Define the aggregation result document.
|
GroupBy |
initialDocument(String initialDocument)
Define the aggregation result document.
|
static GroupBy |
key(String... keys)
Create new
GroupBy with the fields to group. |
static GroupBy |
keyFunction(String key)
Create new
GroupBy with the field to group. |
GroupBy |
reduceFunction(String reduceFunction)
Define the aggregation function that operates on the documents during the grouping operation
|
public GroupBy(String... keys)
public static GroupBy keyFunction(String key)
GroupBy with the field to group.key - public static GroupBy key(String... keys)
GroupBy with the fields to group.keys - public GroupBy initialDocument(@Nullable String initialDocument)
initialDocument - can be null.public GroupBy initialDocument(@Nullable org.bson.Document initialDocument)
initialDocument - can be null.public GroupBy reduceFunction(String reduceFunction)
reduceFunction - public GroupBy finalizeFunction(@Nullable String finalizeFunction)
finalizeFunction - public GroupBy collation(@Nullable Collation collation)
collation - can be null.public org.bson.Document getGroupByObject()
Document representation of the GroupBy.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.