Private
clientPrivate
dbReturns the count of documents in a MongoDB collection that match the specified query.
A promise that resolves to the number of documents matching the query.
The name of the collection to count.
The query to search for.
Deletes multiple documents from a MongoDB collection that match the specified query.
A promise that resolves to the number of documents deleted.
The name of the collection to delete from.
The query to search for.
Deletes a single document from a MongoDB collection that matches the specified query.
A promise that resolves to the number of documents deleted.
The name of the collection to delete from.
The query to search for.
Returns an array of documents from a MongoDB collection that match the specified query.
A promise that resolves to an array of matching documents.
The name of the collection to search.
The query to search for.
Finds a single document in a MongoDB collection that matches the specified query.
A promise that resolves to the matching document, or null
if no document is found.
The name of the collection to search.
The query to search for.
Finds a single document from a MongoDB collection that matches the specified query and deletes it.
A promise that resolves to the deleted document or null if no document was found.
The name of the collection to delete from.
The query to search for.
Finds a single document from a MongoDB collection that matches the specified query and updates it.
A promise that resolves to the updated document or null if no document was found.
The name of the collection to update.
The query to search for.
The update operation to apply.
Optional
options: { Optional settings for the update operation.
Optional
returnReturns the specified MongoDB collection.
The MongoDB Collection
instance.
The name of the collection to retrieve.
Inserts multiple documents into a MongoDB collection.
A promise that resolves to the InsertManyResult
.
The name of the collection to insert the documents into.
An array of documents to insert.
Inserts a single document into a MongoDB collection.
A promise that resolves to the InsertOneResult
.
The name of the collection to insert the document into.
The document to insert.
Updates multiple documents in a MongoDB collection that match the specified query.
A promise that resolves to the number of documents updated.
The name of the collection to update.
The query to search for.
The update operation to apply.
Updates a single document in a MongoDB collection that matches the specified query.
A promise that resolves to the number of documents updated.
The name of the collection to update.
The query to search for.
The update to apply.
Generated using TypeDoc
Connects to a MongoDB server.