reactivemongo.api.collections.UpdateOps
the ordered behaviour
the writer concern to be used
Prepares an UpdateCommand.UpdateElement
Prepares an UpdateCommand.UpdateElement
Prepares an UpdateCommand.UpdateElement
Updates many documents, according the ordered behaviour.
Updates many documents, according the ordered behaviour.
import reactivemongo.bson.BSONDocument import reactivemongo.api.collections.BSONCollection def updateMany(coll: BSONCollection, docs: Iterable[BSONDocument]) = { val update = coll.update(ordered = true) val elements = docs.map { doc => update.element( q = BSONDocument("update" -> "selector"), u = BSONDocument("$set" -> doc), upsert = true, multi = false) } update.many(elements) // Future[MultiBulkWriteResult] }
Performs a single update (see UpdateCommand.UpdateElement).
Performs a single update (see UpdateCommand.UpdateElement).
Performs a single update (see UpdateCommand.UpdateElement).
(updateBuilder: StringAdd).self
(updateBuilder: StringFormat).self
(updateBuilder: ArrowAssoc[GenericCollection.UpdateBuilder]).x
(Since version 2.10.0) Use leftOfArrow
instead
(updateBuilder: Ensuring[GenericCollection.UpdateBuilder]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Builder for update operations.