Methods
- pipeline
- Type:
[object, ...]
An array of aggregation pipeline stages.
- filter optional
- Type:
object
An optional filter applied to narrow down the results.
- options optional
- Type:
object
Additional options to apply.
- limit optional
- Type:
number
The maximum number of documents to return.
- filter
- Type:
object
A filter applied to narrow down the result.
- filter
- Type:
object
A filter applied to narrow down the result.
- filter optional
- Type:
object
An optional filter applied to narrow down the results.
- options optional
- Type:
object
Additional options to apply.
- projection optional
- Type:
object
Limits the fields to return for all matching documents. See Tutorial: Project Fields to Return from Query.
- sort optional
- Type:
object
The order in which to return matching documents.
- limit optional
- Type:
number
The maximum number of documents to return.
- filter optional
- Type:
object
An optional filter applied to narrow down the results.
- options optional
- Type:
object
Additional options to apply.
- projection optional
- Type:
object
Limits the fields to return for all matching documents. See Tutorial: Project Fields to Return from Query.
- sort optional
- Type:
object
The order in which to return matching documents.
- filter
- Type:
object
A filter applied to narrow down the results.
- options optional
- Type:
object
Additional options to apply.
- projection optional
- Type:
object
Limits the fields to return for all matching documents. See Tutorial: Project Fields to Return from Query.
- sort optional
- Type:
object
The order in which to return matching documents.
- filter
- Type:
object
A filter applied to narrow down the results.
- replacement
- Type:
object
The new values for the document.
- options optional
- Type:
object
Additional options to apply.
- projection optional
- Type:
object
Limits the fields to return for all matching documents. See Tutorial: Project Fields to Return from Query.
- sort optional
- Type:
object
The order in which to return matching documents.
- upsert optional
- Type:
boolean
- Default:
false
if true, indicates that MongoDB should insert a new document that matches the query filter when the query does not match any existing documents in the collection.
- returnNewDocument optional
- Type:
boolean
- Default:
false
if true, indicates that the action should return the document in its updated form instead of its original, pre-update form.
- filter
- Type:
object
A filter applied to narrow down the results.
- update
- Type:
object
The new values for the document.
- options optional
- Type:
object
Additional options to apply.
- projection optional
- Type:
object
Limits the fields to return for all matching documents. See Tutorial: Project Fields to Return from Query.
- sort optional
- Type:
object
The order in which to return matching documents.
- upsert optional
- Type:
boolean
- Default:
false
if true, indicates that MongoDB should insert a new document that matches the query filter when the query does not match any existing documents in the collection.
- returnNewDocument optional
- Type:
boolean
- Default:
false
if true, indicates that the action should return the document in its updated form instead of its original, pre-update form.
- documents
- Type:
[object, ...]
The array of documents.
- document
- Type:
object
The document.
- filter
- Type:
object
A filter applied to narrow down the results.
- update
- Type:
object
The new values for the document.
- options optional
- Type:
object
Additional options to apply.
- upsert optional
- Type:
boolean
- Default:
false
if true, indicates that MongoDB should insert a new document that matches the query filter when the query does not match any existing documents in the collection.
- filter
- Type:
object
A filter applied to narrow down the results.
- update
- Type:
object
The new values for the document.
- options optional
- Type:
object
Additional options to apply.
- upsert optional
- Type:
boolean
- Default:
false
if true, indicates that MongoDB should insert a new document that matches the query filter when the query does not match any existing documents in the collection.
[object, ...]
Runs an aggregation framework pipeline against this collection.
Parameters:
[object, ...]
The result.
number
Counts the number of documents in this collection matching the provided filter.
Parameters:
number
DeleteResult
Deletes multiple documents.
Parameters:
DeleteResult
DeleteResult
Deletes a single matching document from the collection.
Parameters:
DeleteResult
[object, ...]
Finds the documents which match the provided query.
Parameters:
[object, ...]
The documents.
object
Finds a document which matches the provided filter.
Parameters:
object
The document or null if nothing matched.
object
Finds a document which matches the provided filter and deletes it
Parameters:
object
The document or null if nothing matched.
object
Finds a document which matches the provided filter and replaces it with a new document.
Parameters:
object
The document (before or after modification) or null if nothing matched.
nullable
object
Finds a document which matches the provided query and performs the desired update to individual fields.
Parameters:
object
The document (before or after modification) or null if nothing matched.
nullable
InsertManyResult
Inserts an array of documents into the collection. If any values are missing identifiers, they will be generated by the server.
Parameters:
InsertManyResult
The _ids of the inserted documents.
InsertOneResult
Inserts a single document into the collection. Note: If the document is missing an _id, one will be generated for it by the server.
Parameters:
InsertOneResult
The _id of the inserted document.
UpdateResult
Updates multiple documents matching the provided filter in this collection.
Parameters:
UpdateResult
UpdateResult
Updates a single document matching the provided filter in this collection.
Parameters:
UpdateResult
Type Definitions
- deletedCount
- Type:
number
The number of documents that were deleted.
- insertedIds
- Type:
Array
The ids of the inserted documents
- insertedId
The id of the inserted document
- matchedCount
- Type:
number
The number of documents that matched the filter.
- modifedCount
- Type:
number
The number of documents matched by the query.
- upsertedId optional
The identifier of the inserted document if an upsert took place.
Result of deleting documents
Type:
object
Properties:
Properties:
Properties:
Result of updating documents
Type:
object