kmongo / org.litote.kmongo.rxjava2 / com.mongodb.reactivestreams.client.MongoCollection / bulkWrite

bulkWrite

fun <reified T : Any> MongoCollection<T>.bulkWrite(vararg requests: String, options: BulkWriteOptions = BulkWriteOptions()): Maybe<BulkWriteResult> (source)

Executes a mix of inserts, updates, replaces, and deletes.

Parameters

requests - the writes to execute

options - the options to apply to the bulk write operation

Return
the result of the bulk write

fun <reified T : Any> MongoCollection<T>.bulkWrite(clientSession: ClientSession, vararg requests: String, options: BulkWriteOptions = BulkWriteOptions()): Maybe<BulkWriteResult> (source)

Executes a mix of inserts, updates, replaces, and deletes.

Parameters

clientSession - the client session

requests - the writes to execute

options - the options to apply to the bulk write operation

Return
the result of the bulk write

fun <reified T : Any> MongoCollection<T>.bulkWrite(vararg requests: WriteModel<T>, options: BulkWriteOptions = BulkWriteOptions()): Maybe<BulkWriteResult> (source)

Executes a mix of inserts, updates, replaces, and deletes.

Parameters

requests - the writes to execute

options - the options to apply to the bulk write operation

fun <reified T : Any> MongoCollection<T>.bulkWrite(clientSession: ClientSession, vararg requests: WriteModel<T>, options: BulkWriteOptions = BulkWriteOptions()): Maybe<BulkWriteResult> (source)

Executes a mix of inserts, updates, replaces, and deletes.

Parameters

clientSession - the client session

requests - the writes to execute

options - the options to apply to the bulk write operation