Skip to content

MongoDB driver for Kotlin (coroutines)opensavvy.ktmongo.coroutines.operationsUpdateOperations

UpdateOperations

Interface grouping MongoDB operations allowing to update existing information.

Inheritors

Properties

context

abstract val context: 

Functions

bulkWrite

abstract suspend fun bulkWrite(options: <Document>.() -> Unit = {}, filter: <Document>.() -> Unit = {}, operations: <Document>.() -> Unit)

Performs multiple update operations in a single request.

findOneAndUpdate

abstract suspend fun findOneAndUpdate(options: <Document>.() -> Unit = {}, filter: <Document>.() -> Unit = {}, update: <Document>.() -> Unit): Document?

Updates one element that matches filter according to update and returns it, atomically.

updateMany

abstract suspend fun updateMany(options: <Document>.() -> Unit = {}, filter: <Document>.() -> Unit = {}, update: <Document>.() -> Unit)

Updates all documents that match filter according to update.

updateOne

abstract suspend fun updateOne(options: <Document>.() -> Unit = {}, filter: <Document>.() -> Unit = {}, update: <Document>.() -> Unit)

Updates a single document that matches filter according to update.

upsertOne

abstract suspend fun upsertOne(options: <Document>.() -> Unit = {}, filter: <Document>.() -> Unit = {}, update: <Document>.() -> Unit)

Updates a single document that matches filter according to update.