Sets an option on this aggregation. This function will be deprecated in a future release.
Appends a new $addFields operator to this aggregate pipeline. Requires MongoDB v3.4+ to work
Sets the allowDiskUse option for the aggregation query
Appends new operators to this aggregate pipeline
Set the collation.
Appends a new $count operator to this aggregate pipeline.
Appends a new $densify operator to this aggregate pipeline
Sets the cursor option for the aggregation query
Executes the aggregate pipeline on the currently bound Model.
Execute the aggregation with explain
Combines multiple aggregation pipelines.
Appends a new $fill operator to this aggregate pipeline
Appends new custom $graphLookup operator(s) to this aggregate pipeline, performing a recursive search on a collection.
Appends new custom $group operator to this aggregate pipeline.
Sets the hint option for the aggregation query
Appends a new $limit operator to this aggregate pipeline.
maximum number of records to pass to the next stage
Appends new custom $lookup operator to this aggregate pipeline.
Appends a new custom $match operator to this aggregate pipeline.
$match operator contents
Binds this aggregate to a model.
the model to which the aggregate is to be bound
Append a new $near operator to this aggregation pipeline
$near operator contents
Returns the current pipeline
Appends a new $project operator to this aggregate pipeline.
Sets the readPreference option for the aggregation query.
Sets the readConcern level for the aggregation query.
Appends a new $replaceRoot operator to this aggregate pipeline.
Helper for Atlas Text Search's
$search
stage.
Lets you set arbitrary options, for middlewares or plugins.
Appends new custom $sample operator to this aggregate pipeline.
Sets the session for this aggregation. Useful for transactions.
Appends a new $skip operator to this aggregate pipeline.
number of records to skip before next stage
Appends a new $sort operator to this aggregate pipeline.
Appends a new $sortByCount operator to this aggregate pipeline. Accepts either a string field name or a pipeline object.
Appends new $unionWith operator to this aggregate pipeline.
Appends new custom $unwind operator(s) to this aggregate pipeline.
Attaches a callback for only the rejection of the Promise.
The callback to execute when the Promise is rejected.
A Promise for the completion of the callback.
Attaches callbacks for the resolution and/or rejection of the Promise.
The callback to execute when the Promise is resolved.
The callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
Generated using TypeDoc
Returns an asyncIterator for use with
for/await/of
loops You do not need to call this function explicitly, the JavaScript runtime will call it for you.