Packages

o

org.mongodb.scala.model

Aggregates

object Aggregates

Builders for aggregation pipeline stages.

Since

1.0

See also

Aggregation pipeline

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addFields(fields: Field[_]*): Bson

    Creates an $addFields pipeline stage

    Creates an $addFields pipeline stage

    fields

    the fields to add

    returns

    the $addFields pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $addFields

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def bucket[TExpression, TBoundary](groupBy: TExpression, options: BucketOptions, boundaries: TBoundary*): Bson

    Creates a $bucket pipeline stage

    Creates a $bucket pipeline stage

    TExpression

    the groupBy expression type

    TBoundary

    the boundary type

    groupBy

    the criteria to group By

    options

    the optional values for the $bucket stage

    boundaries

    the boundaries of the buckets

    returns

    the $bucket pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $bucket

  7. def bucket[TExpression, TBoundary](groupBy: TExpression, boundaries: TBoundary*): Bson

    Creates a $bucket pipeline stage

    Creates a $bucket pipeline stage

    TExpression

    the groupBy expression type

    TBoundary

    the boundary type

    groupBy

    the criteria to group By

    boundaries

    the boundaries of the buckets

    returns

    the $bucket pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $bucket

  8. def bucketAuto[TExpression, TBoundary](groupBy: TExpression, buckets: Int, options: BucketAutoOptions): Bson

    Creates a $bucketAuto pipeline stage

    Creates a $bucketAuto pipeline stage

    TExpression

    the groupBy expression type

    groupBy

    the criteria to group By

    buckets

    the number of the buckets

    options

    the optional values for the $bucketAuto stage

    returns

    the $bucketAuto pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $bucketAuto

  9. def bucketAuto[TExpression, TBoundary](groupBy: TExpression, buckets: Int): Bson

    Creates a $bucketAuto pipeline stage

    Creates a $bucketAuto pipeline stage

    TExpression

    the groupBy expression type

    groupBy

    the criteria to group By

    buckets

    the number of the buckets

    returns

    the $bucketAuto pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $bucketAuto

  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def count(field: String): Bson

    Creates a $count pipeline stage using the named field to store the result

    Creates a $count pipeline stage using the named field to store the result

    field

    the field in which to store the count

    returns

    the $count pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $count

  12. def count(): Bson

    Creates a $count pipeline stage using the field name "count" to store the result

    Creates a $count pipeline stage using the field name "count" to store the result

    returns

    the $count pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $count

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def facet(facets: Facet*): Bson

    Creates a $facet pipeline stage

    Creates a $facet pipeline stage

    facets

    the facets to use

    returns

    the new pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $facet

  16. def filter(filter: Bson): Bson

    Creates a $match pipeline stage for the specified filter

    Creates a $match pipeline stage for the specified filter

    A friendly alias for the match method.

    filter

    the filter to match against

    returns

    the $match pipeline stage

    See also

    $match

    Filters

  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  19. def graphLookup[TExpression](from: String, startWith: TExpression, connectFromField: String, connectToField: String, as: String, options: GraphLookupOptions): Bson

    Creates a graphLookup pipeline stage for the specified filter

    Creates a graphLookup pipeline stage for the specified filter

    TExpression

    the expression type

    from

    the collection to query

    startWith

    the expression to start the graph lookup with

    connectFromField

    the from field

    connectToField

    the to field

    as

    name of field in output document

    options

    optional values for the graphLookup

    returns

    the $graphLookup pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $graphLookup

  20. def graphLookup[TExpression](from: String, startWith: TExpression, connectFromField: String, connectToField: String, as: String): Bson

    Creates a $graphLookup pipeline stage for the specified filter

    Creates a $graphLookup pipeline stage for the specified filter

    TExpression

    the expression type

    from

    the collection to query

    startWith

    the expression to start the graph lookup with

    connectFromField

    the from field

    connectToField

    the to field

    as

    name of field in output document

    returns

    the $graphLookup pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $graphLookup

  21. def group[TExpression](id: TExpression, fieldAccumulators: BsonField*): Bson

    Creates a $group pipeline stage for the specified filter

    Creates a $group pipeline stage for the specified filter

    TExpression

    the expression type

    id

    the id expression for the group

    fieldAccumulators

    zero or more field accumulator pairs

    returns

    the $group pipeline stage

    See also

    Expressions

    $group

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def limit(limit: Int): Bson

    Creates a $limit pipeline stage for the specified filter

    Creates a $limit pipeline stage for the specified filter

    limit

    the limit

    returns

    the $limit pipeline stage

    See also

    $limit

  25. def lookup(from: String, localField: String, foreignField: String, as: String): Bson

    Creates a $lookup pipeline stage for the specified filter

    Creates a $lookup pipeline stage for the specified filter

    from

    the name of the collection in the same database to perform the join with.

    localField

    specifies the field from the local collection to match values against.

    foreignField

    specifies the field in the from collection to match values against.

    as

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

    returns

    the $lookup pipeline stage

    Since

    1.1

    Note

    Requires MongoDB 3.2 or greater

    See also

    $lookup

  26. def match(filter: Bson): Bson

    Creates a $match pipeline stage for the specified filter

    Creates a $match pipeline stage for the specified filter

    filter

    the filter to match

    returns

    the $match pipeline stage

    See also

    $match

    Filters

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  30. def out(collectionName: String): Bson

    Creates a $out pipeline stage for the specified filter

    Creates a $out pipeline stage for the specified filter

    collectionName

    the collection name

    returns

    the $out pipeline stage

    See also

    $out

  31. def project(projection: Bson): Bson

    Creates a $project pipeline stage for the specified projection

    Creates a $project pipeline stage for the specified projection

    projection

    the projection

    returns

    the $project pipeline stage

    See also

    $project

    Projections

  32. def replaceRoot[TExpression](value: TExpression): Bson

    Creates a $replaceRoot pipeline stage

    Creates a $replaceRoot pipeline stage

    TExpression

    the new root type

    value

    the new root value

    returns

    the $replaceRoot pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $replaceRoot

  33. def sample(size: Int): Bson

    Creates a $sample pipeline stage with the specified sample size

    Creates a $sample pipeline stage with the specified sample size

    size

    the sample size

    returns

    the $sample pipeline stage

    Since

    1.1

    See also

    $sample

  34. def skip(skip: Int): Bson

    Creates a $skip pipeline stage

    Creates a $skip pipeline stage

    skip

    the number of documents to skip

    returns

    the $skip pipeline stage

    See also

    reference/operator/aggregation/skip/ $skip

  35. def sort(sort: Bson): Bson

    Creates a $sort pipeline stage for the specified sort specification

    Creates a $sort pipeline stage for the specified sort specification

    sort

    the sort specification

    returns

    the $sort pipeline stage

    See also

    $sort

    Sorts

  36. def sortByCount[TExpression](filter: TExpression): Bson

    Creates a $sortByCount pipeline stage for the specified filter

    Creates a $sortByCount pipeline stage for the specified filter

    TExpression

    the expression type

    filter

    the filter specification

    returns

    the $sortByCount pipeline stage

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

    See also

    $sortByCount

    Sorts

  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. def unwind(fieldName: String, unwindOptions: UnwindOptions): Bson

    Creates a $unwind pipeline stage for the specified field name, which must be prefixed by a $ sign.

    Creates a $unwind pipeline stage for the specified field name, which must be prefixed by a $ sign.

    fieldName

    the field name, prefixed by a $ sign

    returns

    the $unwind pipeline stage

    Since

    1.1

    See also

    $unwind

  40. def unwind(fieldName: String): Bson

    Creates a $unwind pipeline stage for the specified field name, which must be prefixed by a $ sign.

    Creates a $unwind pipeline stage for the specified field name, which must be prefixed by a $ sign.

    fieldName

    the field name, prefixed by a $ sign

    returns

    the $unwind pipeline stage

    See also

    $unwind

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

Inherited from AnyRef

Inherited from Any

Ungrouped