Object

reactivemongo.api.commands.bson

BSONAggregationFramework

Related Doc: package bson

Permalink

object BSONAggregationFramework extends AggregationFramework[BSONSerializationPack.type]

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BSONAggregationFramework
  2. AggregationFramework
  3. GroupAggregation
  4. ImplicitCommandHelpers
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AddFieldToSet(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink
    Definition Classes
    GroupAggregation
  2. case class AddFields(specifications: P.Document) extends PipelineOperator with Product with Serializable

    Permalink

    Since MongoDB 3.4

    Since MongoDB 3.4

    specifications

    The fields to include. The resulting objects will also contain these fields.

    Definition Classes
    GroupAggregation
    See also

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

  3. case class AddToSet(addToSetExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    addToSetExpr

    the $addToSet expression

    Definition Classes
    GroupAggregation
  4. case class Aggregate(pipeline: Seq[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

    Permalink

    pipeline

    the sequence of MongoDB aggregation operations

    explain

    specifies to return the information on the processing of the pipeline

    allowDiskUse

    enables writing to temporary files

    cursor

    the cursor object for aggregation

    bypassDocumentValidation

    available only if you specify the $out aggregation operator

    readConcern

    the read concern (since MongoDB 3.2)

    Definition Classes
    AggregationFramework
  5. case class AggregationResult(firstBatch: List[P.Document], cursor: Option[ResultCursor] = None) extends Product with Serializable

    Permalink

    firstBatch

    the documents of the first batch

    cursor

    the cursor from the result, if any

    Definition Classes
    AggregationFramework
    See also

    Cursor

  6. case class Ascending(field: String) extends SortOrder with Product with Serializable

    Permalink

    Ascending sort order

    Ascending sort order

    Definition Classes
    AggregationFramework
  7. case class Avg(avgExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink
    Definition Classes
    GroupAggregation
  8. case class AvgField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

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

    Permalink

    Since MongoDB 3.4 Categorizes incoming documents into a specific number of groups, called buckets, based on a specified expression.

    Since MongoDB 3.4 Categorizes incoming documents into a specific number of groups, called buckets, based on a specified expression. Bucket boundaries are automatically determined in an attempt to evenly distribute the documents into the specified number of buckets. Document fields identifier must be prefixed with $. https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/

    Definition Classes
    AggregationFramework
  10. case class Cursor(batchSize: Int) extends Product with Serializable

    Permalink

    batchSize

    the initial batch size for the cursor

    Definition Classes
    AggregationFramework
  11. case class Descending(field: String) extends SortOrder with Product with Serializable

    Permalink

    Descending sort order

    Descending sort order

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

    Permalink

    The $filter aggregation stage.

    The $filter aggregation stage.

    input

    the expression that resolves to an array

    as

    The variable name for the element in the input array. The as expression accesses each element in the input array by this variable.

    cond

    the expression that determines whether to include the element in the resulting array

    Definition Classes
    AggregationFramework
  13. case class First(firstExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink
    Definition Classes
    GroupAggregation
  14. case class FirstField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

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

    Permalink

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

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

    http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/#pipe._S_geoNear

    near

    the point for which to find the closest documents

    spherical

    if using a 2dsphere index

    limit

    the maximum number of documents to return

    maxDistance

    the maximum distance from the center point that the documents can be

    query

    limits the results to the matching documents

    distanceMultiplier

    the factor to multiply all distances returned by the query

    uniqueDocs

    if this value is true, the query returns a matching document once

    distanceField

    the output field that contains the calculated distance

    includeLocs

    this specifies the output field that identifies the location used to calculate the distance

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

    Permalink

    Groups documents together to calulate aggregates on document collections.

    Groups documents together to calulate aggregates on document collections. This command aggregates on arbitrary identifiers. Document fields identifier must be prefixed with $. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group

    identifiers

    any BSON value acceptable by mongodb as identifier

    ops

    the sequence of operators specifying aggregate calculation

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

    Permalink

    Groups documents together to calulate aggregates on document collections.

    Groups documents together to calulate aggregates on document collections. This command aggregates on one field. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group

    idField

    the name of the field to aggregate on

    ops

    the sequence of operators specifying aggregate calculation

    Definition Classes
    AggregationFramework
  18. sealed trait GroupFunction extends AnyRef

    Permalink

    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

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

    Permalink

    Groups documents together to calulate aggregates on document collections.

    Groups documents together to calulate aggregates on document collections. This command aggregates on multiple fields, and they must be named. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group

    idFields

    The fields to aggregate on, and the names they should be aggregated under.

    ops

    the sequence of operators specifying aggregate calculation

    Definition Classes
    AggregationFramework
  20. trait ImplicitlyDocumentProducer extends AnyRef

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

    Permalink

    ops

    the number of operations that used the index

    since

    the time from which MongoDB gathered the statistics

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

    Permalink

    name

    the index name

    key

    the key specification

    host

    the hostname and port of the mongod

    accesses

    the index statistics

    Definition Classes
    AggregationFramework
  23. case class Last(lastExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink
    Definition Classes
    GroupAggregation
  24. case class LastField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

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

    Permalink

    Limits the number of documents that pass through the stream.

    Limits the number of documents that pass through the stream. http://docs.mongodb.org/manual/reference/aggregation/limit/#_S_limit

    limit

    the number of documents to allow through

    Definition Classes
    AggregationFramework
  26. case class Lookup(from: String, localField: String, foreignField: String, as: String) extends PipelineOperator with Product with Serializable

    Permalink

    _Since MongoDB 3.2:_ Performs a left outer join to an unsharded collection in the same database to filter in documents from the "joined" collection for processing.

    _Since MongoDB 3.2:_ Performs a left outer join to an unsharded collection in the same database to filter in documents from the "joined" collection for processing. https://docs.mongodb.com/v3.2/reference/operator/aggregation/lookup/#pipe._S_lookup

    from

    the collection to perform the join with

    localField

    the field from the documents input

    foreignField

    the field from the documents in the from collection

    as

    the name of the new array field to add to the input documents

    Definition Classes
    AggregationFramework
  27. case class Match(predicate: P.Document) extends PipelineOperator with Product with Serializable

    Permalink

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

    Filters out documents from the stream that do not match the predicate. http://docs.mongodb.org/manual/reference/aggregation/match/#_S_match

    predicate

    the query that documents must satisfy to be in the stream

    Definition Classes
    AggregationFramework
  28. case class Max(maxExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    maxExpr

    the $max expression

    Definition Classes
    GroupAggregation
  29. case class MaxField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink
    Definition Classes
    GroupAggregation
  30. sealed trait MetadataKeyword extends AnyRef

    Permalink

    Keyword of metadata.

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

    Permalink

    Metadata sort order.

    keyword

    the metadata keyword to sort by

    Definition Classes
    AggregationFramework
  32. case class Min(minExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    minExpr

    the $min expression

    Definition Classes
    GroupAggregation
  33. case class MinField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

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

    Permalink

    Takes the documents returned by the aggregation pipeline and writes them to a specified collection http://docs.mongodb.org/manual/reference/operator/aggregation/out/#pipe._S_out

    Takes the documents returned by the aggregation pipeline and writes them to a specified collection http://docs.mongodb.org/manual/reference/operator/aggregation/out/#pipe._S_out

    collection

    the name of the output collection

    Definition Classes
    AggregationFramework
  35. sealed trait PipelineOperator extends AnyRef

    Permalink

    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
    AggregationFramework
  36. case class Project(specifications: P.Document) extends PipelineOperator with Product with Serializable

    Permalink

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

    Reshapes a document stream by renaming, adding, or removing fields. Also uses Project to create computed values or sub-objects.

    specifications

    The fields to include. The resulting objects will contain only these fields.

    Definition Classes
    AggregationFramework
  37. case class Push(pushExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    pushExpr

    the $push expression

    Definition Classes
    GroupAggregation
  38. case class PushField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

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

    Permalink

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

    Restricts the contents of the documents based on information stored in the documents themselves. http://docs.mongodb.org/manual/reference/operator/aggregation/redact/#pipe._S_redact Redact

    expression

    the redact expression

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

    Permalink

    Randomly selects the specified number of documents from its input.

    Randomly selects the specified number of documents from its input. https://docs.mongodb.org/master/reference/operator/aggregation/sample/

    size

    the number of documents to return

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

    Permalink

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

    Skips over a number of documents before passing all further documents along the stream. http://docs.mongodb.org/manual/reference/aggregation/skip/#_S_skip

    skip

    the number of documents to skip

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

    Permalink

    Sorts the stream based on the given fields.

    Sorts the stream based on the given fields. http://docs.mongodb.org/manual/reference/aggregation/sort/#_S_sort

    fields

    the fields to sort by

    Definition Classes
    AggregationFramework
  43. sealed trait SortOrder extends AnyRef

    Permalink

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

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

    Definition Classes
    AggregationFramework
  44. case class StdDevPop(expression: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    The $stdDevPop group accumulator (since MongoDB 3.2)

    The $stdDevPop group accumulator (since MongoDB 3.2)

    Definition Classes
    GroupAggregation
  45. case class StdDevPopField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

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

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

    Definition Classes
    GroupAggregation
  46. case class StdDevSamp(expression: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    The $stdDevSamp group accumulator (since MongoDB 3.2)

    The $stdDevSamp group accumulator (since MongoDB 3.2)

    Definition Classes
    GroupAggregation
  47. case class StdDevSampField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

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

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

    Definition Classes
    GroupAggregation
  48. case class Sum(sumExpr: P.Value) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    sumExpr

    the $sum expression

    Definition Classes
    GroupAggregation
  49. case class SumField(field: String) extends AggregationFramework.GroupFunction with Product with Serializable

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

    Permalink
    Definition Classes
    AggregationFramework
  51. case class UnwindField(field: String) extends Unwind with Product with Serializable

    Permalink

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

    Turns a document with an array into multiple documents, one document for each element in the array. http://docs.mongodb.org/manual/reference/aggregation/unwind/#_S_unwind

    field

    the name of the array to unwind

    Definition Classes
    AggregationFramework
  52. case class SumValue(value: Int) extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink
    Definition Classes
    GroupAggregation
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use SumAll

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Filter extends Serializable

    Permalink

    Filter companion

    Filter companion

    Definition Classes
    AggregationFramework
  5. object GroupFunction

    Permalink

    Factory to declare custom call to a group function.

    Factory to declare custom call to a group function.

    Definition Classes
    GroupAggregation
  6. object ImplicitlyDocumentProducer

    Permalink
    Definition Classes
    ImplicitCommandHelpers
  7. object IndexStats extends PipelineOperator with Product with Serializable

    Permalink

    Since MongoDB 3.2 https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/

    Since MongoDB 3.2 https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/

    Definition Classes
    AggregationFramework
  8. object PipelineOperator

    Permalink

    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
    AggregationFramework
  9. object SumAll extends AggregationFramework.GroupFunction with Product with Serializable

    Permalink

    Sum operation of the form $sum: 1

    Sum operation of the form $sum: 1

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

    Permalink

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

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

    Definition Classes
    AggregationFramework
  11. object Unwind extends Serializable

    Permalink
    Definition Classes
    AggregationFramework
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def booleanValue(b: Boolean): BSONValue

    Permalink

    Returns an boolean as a serialized value.

    Returns an boolean as a serialized value.

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def doubleValue(d: Double): BSONValue

    Permalink

    Returns an double as a serialized value.

    Returns an double as a serialized value.

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  16. def elementProducer(name: String, value: BSONValue): BSONElement

    Permalink

    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
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  17. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def intValue(i: Int): BSONValue

    Permalink

    Returns an integer as a serialized value.

    Returns an integer as a serialized value.

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def longValue(l: Long): BSONValue

    Permalink

    Returns an long as a serialized value.

    Returns an long as a serialized value.

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  25. def makeArray(value: BSONValue, values: Seq[BSONValue]): BSONArray

    Permalink

    Returns a non empty array of values

    Returns a non empty array of values

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  26. def makeDocument(elements: Seq[Producer[BSONElement]]): BSONDocument

    Permalink

    Returns a document from a sequence of element producers.

    Returns a document from a sequence of element producers.

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. val pack: BSONSerializationPack.type

    Permalink
  31. def stringValue(s: String): BSONValue

    Permalink

    Returns an string as a serialized value.

    Returns an string as a serialized value.

    Attributes
    protected
    Definition Classes
    BSONAggregationFrameworkAggregationFramework
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped