GenericMongoCollection
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Members list
Value members
Abstract methods
Aggregates documents according to the specified aggregation pipeline. http://docs.mongodb.org/manual/aggregation/
Aggregates documents according to the specified aggregation pipeline. http://docs.mongodb.org/manual/aggregation/
Attributes
- pipeline
the aggregate pipeline
Executes a mix of inserts, updates, replaces, and deletes.
Executes a mix of inserts, updates, replaces, and deletes.
https://docs.mongodb.com/manual/reference/method/db.collection.bulkWrite/
Attributes
- commands
the writes to execute
- options
the options to apply to the bulk write operation
Counts the number of documents in the collection according to the given options.
Counts the number of documents in the collection according to the given options.
Attributes
- filter
the query filter
- options
the options describing the count
- Since:
2.4
Attributes
- key
an object describing the index key(s). This can be of any type for which a
Codec
is registered- options
the options for the index
Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
Attributes
- filter
the query filter to apply the the delete operation
- options
the options to apply to the delete operation @since 1.2
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
Attributes
- filter
the query filter to apply the the delete operation
- options
the options to apply to the delete operation @since 1.2
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
Attributes
- fieldName
the field name
- filter
the query filter
Drops this collection from the Database.
Drops this collection from the Database.
Attributes
Drops the given index.
Drops the given index.
http://docs.mongodb.org/manual/reference/command/dropIndexes/
Attributes
- name
the name of the index to remove
- options
options to use when dropping indexes
Drops the index given the keys used to create it.
Drops the index given the keys used to create it.
Attributes
- keys
the keys of the index to remove
- options
options to use when dropping indexes
- Since:
2.2
Drop all the indexes on this collection, except for the default on _id.
Drop all the indexes on this collection, except for the default on _id.
http://docs.mongodb.org/manual/reference/command/dropIndexes/
Attributes
- options
options to use when dropping indexes
- Since:
2.2
Finds matching documents in the collection.
Finds matching documents in the collection.
Attributes
- filter
the query filter
Atomically find a document and remove it.
Atomically find a document and remove it.
Attributes
- filter
the query filter to find the document with
- options
the options to apply to the operation
- Note:
If no documents matched the query filter, then None will be returned
Atomically find a document and replace it.
Atomically find a document and replace it.
Attributes
- filter
the query filter to apply the the replace operation
- options
the options to apply to the operation
- replacement
the replacement document
- Note:
Depending on the value of the
returnOriginal
property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then None will be returned
Atomically find a document and update it.
Atomically find a document and update it.
Attributes
- filter
a document describing the query filter. This can be of any type for which a
Codec
is registered- options
the options to apply to the operation
- update
a document describing the update. The update to apply must include only update operators. This can be of any type for which a
Codec
is registered- Note:
Depending on the value of the
returnOriginal
property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then None will be returned
Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API. However, when talking with a server < 2.6, using this method will be faster due to constraints in the bulk API related to error handling.
Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API. However, when talking with a server < 2.6, using this method will be faster due to constraints in the bulk API related to error handling.
Attributes
- documents
the documents to insert
- options
the options to apply to the operation
Inserts the provided document. If the document is missing an identifier, the driver should generate one.
Inserts the provided document. If the document is missing an identifier, the driver should generate one.
Attributes
- document
the document to insert
- options
the options to apply to the operation @since 1.1
Get all the indexes in this collection.
Get all the indexes in this collection.
http://docs.mongodb.org/manual/reference/command/listIndexes
Attributes
- session
the client session with which to associate this operation
Rename the collection with oldCollectionName to the newCollectionName.
Rename the collection with oldCollectionName to the newCollectionName.
https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/
Attributes
- options
the options for renaming a collection
- target
the name the collection will be renamed to
Replace a document in the collection according to the specified arguments.
Replace a document in the collection according to the specified arguments.
http://docs.mongodb.org/manual/tutorial/modify-documents/#replace-the-document
Attributes
- filter
the query filter to apply the the replace operation
- options
the options to apply to the replace operation
- replacement
the replacement document
Update all documents in the collection according to the specified arguments.
Update all documents in the collection according to the specified arguments.
http://docs.mongodb.org/manual/tutorial/modify-documents/ http://docs.mongodb.org/manual/reference/operator/update/
Attributes
- filter
a document describing the query filter. This can be of any type for which a
Codec
is registered- options
the options to apply to the update operation
- update
a document describing the update. The update to apply must include only update operators. This can be of any type for which a
Codec
is registered
Update all documents in the collection according to the specified arguments.
Update all documents in the collection according to the specified arguments.
http://docs.mongodb.org/manual/tutorial/modify-documents/ http://docs.mongodb.org/manual/reference/operator/update/
Attributes
- filter
a document describing the query filter. This can be of any type for which a
Codec
is registered- options
the options to apply to the update operation
- update
a pipeline describing the update.
- Since:
2.7
- Note:
Requires MongoDB 4.2 or greater
Update a single document in the collection according to the specified arguments.
Update a single document in the collection according to the specified arguments.
http://docs.mongodb.org/manual/tutorial/modify-documents/ http://docs.mongodb.org/manual/reference/operator/update/
Attributes
- filter
a document describing the query filter. This can be of any type for which a
Codec
is registered- options
the options to apply to the update operation
- update
a document describing the update. The update to apply must include only update operators. This can be of any type for which a
Codec
is registered
Update a single document in the collection according to the specified arguments.
Update a single document in the collection according to the specified arguments.
http://docs.mongodb.org/manual/tutorial/modify-documents/ http://docs.mongodb.org/manual/reference/operator/update/
Attributes
- filter
a document describing the query filter. This can be of any type for which a
Codec
is registered- options
the options to apply to the update operation
- update
a pipeline describing the update.
- Since:
2.7
- Note:
Requires MongoDB 4.2 or greater
Creates a change stream for this collection.
Creates a change stream for this collection.
Attributes
- pipeline
the aggregation pipeline to apply to the change stream
- Since:
2.2
- Note:
Requires MongoDB 3.6 or greater
Concrete methods
Counts the number of documents in the collection.
Counts the number of documents in the collection.
Attributes
- Since:
2.4
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
http://docs.mongodb.org/manual/reference/command/distinct/Distinct
Attributes
- fieldName
the field name
Finds all documents in the collection.
Finds all documents in the collection.
Attributes
Creates a change stream for this collection.
Creates a change stream for this collection.
Attributes
- Since:
2.2
- Note:
Requires MongoDB 3.6 or greater