SchemaPipeline

Constructors

this
this(MongoCollection collection)
Undocumented in source.

Members

Functions

collect
DocumentRange!T collect(AggregateOptions options)
Undocumented in source. Be warned that the author may not have intended to support it.
geoNear
SchemaPipeline geoNear(Bson options)
SchemaPipeline geoNear(T options)

Outputs documents in order of nearest to farthest from a specified point. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/#pipe._S_geoNear

group
SchemaPipeline group(Bson id, Bson accumulators)
SchemaPipeline group(K id, T[string] accumulators)

Groups documents by some specified expression and outputs to the next stage a document for each distinct grouping. The output documents contain an _id field which contains the distinct group by key. The output documents can also contain computed fields that hold the values of some accumulator expression grouped by the $group‘s _id field. $group does not order its output documents. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/group/#pipe._S_group

groupAll
SchemaPipeline groupAll(Bson accumulators)
SchemaPipeline groupAll(T[string] accumulators)

Groups all documents into one specified with the accumulators. Basically just runs group(null, accumulators)

indexStats
SchemaPipeline indexStats()

Returns statistics regarding the use of each index for the collection. If running with access control, the user must have privileges that include indexStats action. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/#pipe._S_indexStats

limit
SchemaPipeline limit(size_t count)

Limits the number of documents passed to the next stage in the pipeline. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/limit/#pipe._S_limit

lookup
SchemaPipeline lookup(Bson options)
SchemaPipeline lookup(T options)

Performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing. The $lookup stage does an equality match between a field from the input documents with a field from the documents of the “joined” collection. To each input document, the $lookup stage adds a new array field whose elements are the matching documents from the “joined” collection. The $lookup stage passes these reshaped documents to the next stage. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#pipe._S_lookup

match
SchemaPipeline match(Bson query)
SchemaPipeline match(Query!T query)
SchemaPipeline match(T[string] query)

Filters the documents to pass only the documents that match the specified condition(s) to the next pipeline stage. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/match/#pipe._S_match

outputTo
SchemaPipeline outputTo(string outputCollection)

Takes the documents returned by the aggregation pipeline and writes them to a specified collection. The $out operator must be the last stage in the pipeline. The $out operator lets the aggregation framework return result sets of any size. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/out/#pipe._S_out

project
SchemaPipeline project(Bson specifications)
SchemaPipeline project(T specifications)

Passes along the documents with only the specified fields to the next stage in the pipeline. The specified fields can be existing fields from the input documents or newly computed fields. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/project/#pipe._S_project

redact
SchemaPipeline redact(Bson expression)
SchemaPipeline redact(T expression)

Restricts the contents of the documents based on information stored in the documents themselves. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/redact/#pipe._S_redact

run
Bson run()
Undocumented in source. Be warned that the author may not have intended to support it.
sample
SchemaPipeline sample(size_t count)

Randomly selects the specified number of documents from its input. Warning: $sample may output the same document more than once in its result set. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#pipe._S_sample

skip
SchemaPipeline skip(size_t count)

Skips over the specified number of documents that pass into the stage and passes the remaining documents to the next stage in the pipeline. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/skip/#pipe._S_skip

sort
SchemaPipeline sort(Bson sorter)
SchemaPipeline sort(T sorter)

Sorts all input documents and returns them to the pipeline in sorted order. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#pipe._S_sort

unwind
SchemaPipeline unwind(string path)

Deconstructs an array field from the input documents to output a document for each element. Each output document is the input document with the value of the array field replaced by the element. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/#pipe._S_unwind

unwind
SchemaPipeline unwind(PipelineUnwindOperation op)

Deconstructs an array field from the input documents to output a document for each element. Each output document is the input document with the value of the array field replaced by the element. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/#pipe._S_unwind

unwind
SchemaPipeline unwind(PipelineUnwindOperation op, bool preserveNullAndEmptyArrays)

Deconstructs an array field from the input documents to output a document for each element. Each output document is the input document with the value of the array field replaced by the element. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/#pipe._S_unwind

Meta