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/
Value parameters
- pipeline
-
the aggregate pipeline
Attributes
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/
Value parameters
- commands
-
the writes to execute
- options
-
the options to apply to the bulk write operation
Attributes
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.
Value parameters
- filter
-
the query filter
- options
-
the options describing the count
Attributes
- Since
-
2.4
Value parameters
- 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
Attributes
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.
Value parameters
- filter
-
the query filter to apply the the delete operation
- options
-
the options to apply to the delete operation @since 1.2
Attributes
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.
Value parameters
- filter
-
the query filter to apply the the delete operation
- options
-
the options to apply to the delete operation @since 1.2
Attributes
Gets the distinct values of the specified field name.
Gets the distinct values of the specified field name.
Value parameters
- fieldName
-
the field name
- filter
-
the query filter
Attributes
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/
Value parameters
- name
-
the name of the index to remove
- options
-
options to use when dropping indexes
Attributes
Drops the index given the keys used to create it.
Drops the index given the keys used to create it.
Value parameters
- keys
-
the keys of the index to remove
- options
-
options to use when dropping indexes
Attributes
- 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/
Value parameters
- options
-
options to use when dropping indexes
Attributes
- Since
-
2.2
Finds matching documents in the collection.
Finds matching documents in the collection.
Value parameters
- filter
-
the query filter
Attributes
Atomically find a document and remove it.
Atomically find a document and remove it.
Value parameters
- filter
-
the query filter to find the document with
- options
-
the options to apply to the operation
Attributes
- 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.
Value parameters
- filter
-
the query filter to apply the the replace operation
- options
-
the options to apply to the operation
- replacement
-
the replacement document
Attributes
- 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.
Value parameters
- 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
Attributes
- 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.
Value parameters
- documents
-
the documents to insert
- options
-
the options to apply to the operation
Attributes
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.
Value parameters
- document
-
the document to insert
- options
-
the options to apply to the operation @since 1.1
Attributes
Get all the indexes in this collection.
Get all the indexes in this collection.
http://docs.mongodb.org/manual/reference/command/listIndexes
Value parameters
- session
-
the client session with which to associate this operation
Attributes
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/
Value parameters
- options
-
the options for renaming a collection
- target
-
the name the collection will be renamed to
Attributes
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
Value parameters
- filter
-
the query filter to apply the the replace operation
- options
-
the options to apply to the replace operation
- replacement
-
the replacement document
Attributes
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/
Value parameters
- 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
Attributes
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/
Value parameters
- 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.
Attributes
- 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/
Value parameters
- 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
Attributes
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/
Value parameters
- 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.
Attributes
- Since
-
2.7
- Note
-
Requires MongoDB 4.2 or greater
Creates a change stream for this collection.
Creates a change stream for this collection.
Value parameters
- pipeline
-
the aggregation pipeline to apply to the change stream
Attributes
- 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
Value parameters
- fieldName
-
the field name
Attributes
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