Skip to content

MongoDB driver for Kotlin (synchronous)opensavvy.ktmongo.sync.operationsUpdateOperations

UpdateOperations

Interface grouping MongoDB operations allowing to update existing information.

Inheritors

Properties

context

abstract val context: 

Functions

bulkWrite

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

Performs multiple update operations in a single request.

findOneAndUpdate

abstract 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 fun updateMany(options: <Document>.() -> Unit = {}, filter: <Document>.() -> Unit = {}, update: <Document>.() -> Unit)

Updates all documents that match filter according to update.

updateOne

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

Updates a single document that matches filter according to update.

upsertOne

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

Updates a single document that matches filter according to update.