reactivemongo.api.commands

AggregationFramework

trait AggregationFramework[P <: SerializationPack] extends ImplicitCommandHelpers[P] with GroupAggregation[P] with AggregationPipeline[P]

Implements the Aggregation Framework.

Linear Supertypes
AggregationPipeline[P], GroupAggregation[P], ImplicitCommandHelpers[P], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AggregationFramework
  2. AggregationPipeline
  3. GroupAggregation
  4. ImplicitCommandHelpers
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AddFieldToSet extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  2. case class AddFields extends PipelineOperator with Product with Serializable

    Since MongoDB 3.

    Since MongoDB 3.4

    Definition Classes
    GroupAggregation
    See also

    https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/

  3. case class AddToSet extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  4. case class Ascending(field: String) extends SortOrder with Product with Serializable

    Ascending sort order

  5. case class Avg extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  6. case class AvgField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  7. case class BucketAuto(groupBy: P.Value, buckets: Int, granularity: Option[String])(output: (String, AggregationFramework.GroupFunction)*) extends PipelineOperator with Product with Serializable

    Since MongoDB 3.

  8. case class Descending(field: String) extends SortOrder with Product with Serializable

    Descending sort order

  9. case class Filter(input: P.Value, as: String, cond: P.Document) extends PipelineOperator with Product with Serializable

    The $filter aggregation stage.

  10. case class First extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  11. case class FirstField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  12. case class GeoNear(near: P.Value, spherical: Boolean = false, limit: Long = 100, minDistance: Option[Long] = scala.None, maxDistance: Option[Long] = scala.None, query: Option[P.Document] = scala.None, distanceMultiplier: Option[Double] = scala.None, uniqueDocs: Boolean = false, distanceField: Option[String] = scala.None, includeLocs: Option[String] = scala.None) extends PipelineOperator with Product with Serializable

    Outputs documents in order of nearest to farthest from a specified point.

  13. case class GraphLookup(from: String, startWith: P.Value, connectFromField: String, connectToField: String, as: String, maxDepth: Option[Int] = scala.None, depthField: Option[String] = scala.None, restrictSearchWithMatch: Option[P.Value] = scala.None) extends PipelineOperator with Product with Serializable

    _Since MongoDB 3.

  14. case class Group(identifiers: P.Value)(ops: (String, AggregationFramework.GroupFunction)*) extends PipelineOperator with Product with Serializable

    Groups documents together to calculate aggregates on document collections.

  15. case class GroupField(idField: String)(ops: (String, AggregationFramework.GroupFunction)*) extends PipelineOperator with Product with Serializable

    Groups documents together to calculate aggregates on document collections.

  16. sealed trait GroupFunction extends AnyRef

    Represents one of the group/accumulator operators, for the $group aggregation.

    Represents one of the group/accumulator operators, for the $group aggregation. Operation.

    Definition Classes
    GroupAggregation
    See also

    https://docs.mongodb.com/manual/reference/operator/aggregation/group/#accumulator-operator

  17. case class GroupMulti(idFields: (String, String)*)(ops: (String, AggregationFramework.GroupFunction)*) extends PipelineOperator with Product with Serializable

    Groups documents together to calculate aggregates on document collections.

  18. trait ImplicitlyDocumentProducer extends AnyRef

    Definition Classes
    ImplicitCommandHelpers
  19. case class IndexStatAccesses(ops: Long, since: Long) extends Product with Serializable

  20. case class IndexStatsResult(name: String, key: P.Document, host: String, accesses: IndexStatAccesses) extends Product with Serializable

  21. case class Last extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  22. case class LastField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  23. case class Limit(limit: Int) extends PipelineOperator with Product with Serializable

    Limits the number of documents that pass through the stream.

  24. case class Lookup(from: String, localField: String, foreignField: String, as: String) extends PipelineOperator with Product with Serializable

    _Since MongoDB 3.

  25. case class Match(predicate: P.Document) extends PipelineOperator with Product with Serializable

    Filters out documents from the stream that do not match the predicate.

  26. case class Max extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  27. case class MaxField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  28. sealed trait MetadataKeyword extends AnyRef

    Keyword of metadata.

  29. case class MetadataSort(field: String, keyword: MetadataKeyword) extends SortOrder with Product with Serializable

    Metadata sort order.

  30. case class Min extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  31. case class MinField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  32. case class Out(collection: String) extends PipelineOperator with Product with Serializable

    Takes the documents returned by the aggregation pipeline and writes them to a specified collection http://docs.

  33. trait PipelineOperator extends AnyRef

    One of MongoDBs pipeline operators for aggregation.

    One of MongoDBs pipeline operators for aggregation. Sealed as these are defined in the MongoDB specifications, and clients should not have custom operators.

    Definition Classes
    AggregationPipeline
  34. case class Project(specifications: P.Document) extends PipelineOperator with Product with Serializable

    Reshapes a document stream by renaming, adding, or removing fields.

  35. case class Push extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  36. case class PushField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  37. case class Redact(expression: P.Document) extends PipelineOperator with Product with Serializable

    Restricts the contents of the documents based on information stored in the documents themselves.

  38. case class ReplaceRoot(newRoot: P.Document) extends PipelineOperator with Product with Serializable

    Promotes a specified document to the top level and replaces all other fields.

  39. case class ReplaceRootField(newRoot: String) extends PipelineOperator with Product with Serializable

    Promotes a specified document to the top level and replaces all other fields.

  40. case class Sample(size: Int) extends PipelineOperator with Product with Serializable

    Randomly selects the specified number of documents from its input.

  41. case class Skip(skip: Int) extends PipelineOperator with Product with Serializable

    Skips over a number of documents before passing all further documents along the stream.

  42. case class Sort(fields: SortOrder*) extends PipelineOperator with Product with Serializable

    Sorts the stream based on the given fields.

  43. sealed trait SortOrder extends AnyRef

    Represents that a field should be sorted on, as well as whether it should be ascending or descending.

  44. case class StdDevPop extends GroupFunction with Product with Serializable

    The $stdDevPop group accumulator (since MongoDB 3.

    The $stdDevPop group accumulator (since MongoDB 3.2)

    Definition Classes
    GroupAggregation
  45. case class StdDevPopField extends GroupFunction with Product with Serializable

    The $stdDevPop for a single field (since MongoDB 3.

    The $stdDevPop for a single field (since MongoDB 3.2)

    Definition Classes
    GroupAggregation
  46. case class StdDevSamp extends GroupFunction with Product with Serializable

    The $stdDevSamp group accumulator (since MongoDB 3.

    The $stdDevSamp group accumulator (since MongoDB 3.2)

    Definition Classes
    GroupAggregation
  47. case class StdDevSampField extends GroupFunction with Product with Serializable

    The $stdDevSamp for a single field (since MongoDB 3.

    The $stdDevSamp for a single field (since MongoDB 3.2)

    Definition Classes
    GroupAggregation
  48. case class Sum extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  49. case class SumField extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
  50. class Unwind extends PipelineOperator with Product with Serializable with Serializable

  51. case class UnwindField(field: String) extends Unwind with Product with Serializable

    Turns a document with an array into multiple documents, one document for each element in the array.

  52. case class Aggregate(pipeline: Seq[AggregationFramework.PipelineOperator], explain: Boolean = false, allowDiskUse: Boolean, cursor: Option[Cursor], wireVersion: MongoWireVersion, bypassDocumentValidation: Boolean, readConcern: Option[ReadConcern]) extends CollectionCommand with CommandWithPack[pack.type] with CommandWithResult[AggregationResult] with Product with Serializable

  53. case class AggregationResult(firstBatch: List[P.Document], cursor: Option[ResultCursor] = scala.None) extends Product with Serializable

  54. case class Cursor(batchSize: Int) extends Product with Serializable

  55. case class SumValue extends GroupFunction with Product with Serializable

    Definition Classes
    GroupAggregation
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use SumAll

Abstract Value Members

  1. abstract val pack: P

    Definition Classes
    AggregationPipeline
  2. abstract def booleanValue(b: Boolean): P.Value

    Returns an boolean as a serialized value.

    Returns an boolean as a serialized value.

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  3. abstract def doubleValue(d: Double): P.Value

    Returns an double as a serialized value.

    Returns an double as a serialized value.

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  4. abstract def elementProducer(name: String, value: P.Value): P.ElementProducer

    Returns a producer of element for the given name and value.

    Returns a producer of element for the given name and value.

    name

    the element name

    value

    the element value

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  5. abstract def intValue(i: Int): P.Value

    Returns an integer as a serialized value.

    Returns an integer as a serialized value.

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  6. abstract def longValue(l: Long): P.Value

    Returns an long as a serialized value.

    Returns an long as a serialized value.

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  7. abstract def makeArray(value: P.Value, values: Seq[P.Value]): P.Value

    Returns a non empty array of values

    Returns a non empty array of values

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  8. abstract def makeDocument(elements: Seq[P.ElementProducer]): P.Document

    Returns a document from a sequence of element producers.

    Returns a document from a sequence of element producers.

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

  9. abstract def stringValue(s: String): P.Value

    Returns an string as a serialized value.

    Returns an string as a serialized value.

    Attributes
    protected
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.7) Use pack.newBuilder

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (AggregationFramework[P], B)

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to ArrowAssoc[AggregationFramework[P]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. object Filter extends Serializable

    Filter companion

  9. object GroupFunction

    Factory to declare custom call to a group function.

    Factory to declare custom call to a group function.

    Definition Classes
    GroupAggregation
  10. object ImplicitlyDocumentProducer

    Definition Classes
    ImplicitCommandHelpers
  11. object IndexStats extends PipelineOperator with Product with Serializable

    Since MongoDB 3.

  12. object PipelineOperator

    Only for advanced user: Factory for stage not already provided in the API.

    Only for advanced user: Factory for stage not already provided in the API.

    For example for { $sample: { size: 2 } }

    PipelineOperator(BSONDocument("$sample" -> BSONDocument("size" -> 2)))
    Definition Classes
    AggregationPipeline
  13. object SumAll extends GroupFunction with Product with Serializable

    Sum operation of the form $sum: 1

    Sum operation of the form $sum: 1

    Definition Classes
    GroupAggregation
  14. object TextScore extends MetadataKeyword with Product with Serializable

    References the score associated with the corresponding $text query for each matching document.

  15. object Unwind extends Serializable

  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. lazy val builder: Builder[pack.type]

    Attributes
    protected
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def ensuring(cond: (AggregationFramework[P]) ⇒ Boolean, msg: ⇒ Any): AggregationFramework[P]

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to Ensuring[AggregationFramework[P]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (AggregationFramework[P]) ⇒ Boolean): AggregationFramework[P]

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to Ensuring[AggregationFramework[P]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): AggregationFramework[P]

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to Ensuring[AggregationFramework[P]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): AggregationFramework[P]

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to Ensuring[AggregationFramework[P]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  27. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def [B](y: B): (AggregationFramework[P], B)

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to ArrowAssoc[AggregationFramework[P]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (aggregationFramework: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (aggregationFramework: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: AggregationFramework[P]

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to ArrowAssoc[AggregationFramework[P]] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (aggregationFramework: ArrowAssoc[AggregationFramework[P]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: AggregationFramework[P]

    Implicit information
    This member is added by an implicit conversion from AggregationFramework[P] to Ensuring[AggregationFramework[P]] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (aggregationFramework: Ensuring[AggregationFramework[P]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AggregationPipeline[P]

Inherited from GroupAggregation[P]

Inherited from ImplicitCommandHelpers[P]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from AggregationFramework[P] to StringAdd

Inherited by implicit conversion any2stringfmt from AggregationFramework[P] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from AggregationFramework[P] to ArrowAssoc[AggregationFramework[P]]

Inherited by implicit conversion any2Ensuring from AggregationFramework[P] to Ensuring[AggregationFramework[P]]

Ungrouped