find One And Replace
Atomically find a document and replace it.
Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.
Parameters
the query filter to apply the the replace operation
the replacement document 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 null will be returned
Atomically find a document and replace it.
Parameters
the query filter to apply the the replace operation
the replacement document
the options to apply to the operation 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 null will be returned
Atomically find a document and replace it.
Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.
Since
3.6
Parameters
the client session with which to associate this operation
the query filter to apply the the replace operation
the replacement document 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 null will be returned
Atomically find a document and replace it.
Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.
Since
3.6
Parameters
the client session with which to associate this operation
the query filter to apply the the replace operation
the replacement document
the options to apply to the operation 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 null will be returned