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

updateMany

fun <T> MongoCollection<T>.updateMany(filter: String, update: String, updateOptions: UpdateOptions = UpdateOptions()): Maybe<UpdateResult> (source)

Update all documents in the collection according to the specified arguments.

Parameters

filter - a document describing the query filter

update - a document describing the update. The update to apply must include only update operators.

options - the options to apply to the update operation

Return
the result of the update many operation

fun <T> MongoCollection<T>.updateMany(clientSession: ClientSession, filter: String, update: String, updateOptions: UpdateOptions = UpdateOptions()): Maybe<UpdateResult> (source)

Update all documents in the collection according to the specified arguments.

Parameters

clientSession - the client session

filter - a document describing the query filter

update - a document describing the update. The update to apply must include only update operators.

options - the options to apply to the update operation

Return
the result of the update many operation

fun <T> MongoCollection<T>.updateMany(filter: Bson, vararg updates: SetTo<*>, updateOptions: UpdateOptions = UpdateOptions()): Maybe<UpdateResult> (source)

Update all documents in the collection according to the specified arguments.

Parameters

filter - a document describing the query filter

updates - a document describing the update. The update to apply must include only update operators.

updateOptions - the options to apply to the update operation

Return
the result of the update many operation

fun <T> MongoCollection<T>.updateMany(clientSession: ClientSession, filter: Bson, vararg updates: SetTo<*>, updateOptions: UpdateOptions = UpdateOptions()): Maybe<UpdateResult> (source)

Update all documents in the collection according to the specified arguments.

Parameters

clientSession - the client session

filter - a document describing the query filter

updates - a document describing the update. The update to apply must include only update operators.

updateOptions - the options to apply to the update operation

Return
the result of the update many operation