Ends this session on the server
Advances the operationTime for a ClientSession.
the BSON.Timestamp
of the operation type it is desired to advance to
Advances the clusterTime for a ClientSession to the provided clusterTime of another ClientSession
the $clusterTime returned by the server from another session in the form of a document containing the BSON.Timestamp
clusterTime and signature
Used to determine if this session equals another
The session to compare to
Increment the transaction number on the internal ServerSession
whether this session is currently in a transaction or not
Starts a new transaction with the given options.
Options for the transaction
Commits the currently active transaction in this session.
Aborts the currently active transaction in this session.
This is here to ensure that ClientSession is never serialized to BSON.
Runs a provided callback within a transaction, retrying either the commitTransaction operation or entire transaction as needed (and when the error permits) to better ensure that the transaction can complete successfully.
IMPORTANT: This method requires the user to return a Promise, and await
all operations.
Any callbacks that do not return a Promise will result in undefined behavior.
callback to run within a transaction
optional settings for the transaction
A raw command response or undefined
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.
The server id associated with this session
Whether or not this session is configured for snapshot reads
Generated using TypeDoc
A class representing a client session on the server
NOTE: not meant to be instantiated directly.