kmongo / org.litote.kmongo.coroutine / replaceOne

replaceOne

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.

Parameters

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