delete One
Removes at most one document from the collection that matches the given filter.
If no documents match, the collection is not modified.
Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.
Return
the result of the remove one operation
Parameters
the query filter to apply the delete operation
the options to apply to the delete operation
Throws
if the write failed due to some specific write exception
if the write failed due to being unable to fulfil the write concern
if the write failed due to a specific command exception
if the write failed due some other failure
Removes at most one document from the collection that matches the given filter.
If no documents match, the collection is not modified.
Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.
Return
the result of the remove one operation
Parameters
the client session with which to associate this operation
the query filter to apply the delete operation
the options to apply to the delete operation
Throws
if the write failed due to some specific write exception
if the write failed due to being unable to fulfil the write concern
if the write failed due to a specific command exception
if the write failed due some other failure