Connect to MongoDB using a url
Close the db and its underlying connections
Connect to MongoDB using a url
Starts a new session on the server
Runs a given operation with an implicitly created session. The lifetime of the session will be handled without the need for user interaction.
NOTE: presently the operation MUST return a Promise (either explicit or implicitly as an async function)
An callback to execute with an implicitly created session
Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this cluster. Will ignore all changes to system collections, as well as the local, admin, and config databases.
Type of the data being detected by the change stream
Type of the whole change stream document emitted
An array of aggregation pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents.
Optional settings for the command
Return the mongo client logger
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Sets or gets the default captureRejection value for all emitters.
Generated using TypeDoc
The MongoClient class is a class that allows for making Connections to MongoDB.
The programmatically provided options take precedence over the URI options.