suspend fun <reified T : Any> CoroutineCollection<T>.replaceOne(replacement: T, options: ReplaceOptions = ReplaceOptions()): UpdateResult
(source)
Replace a document in the collection according to the specified arguments.
replacement
- the document to replace - must have an non null id
options
- the options to apply to the replace operation
Return
the result of the replace one operation