the ordered behaviour
the writer concern to be used
Inserts many documents, according the ordered behaviour.
Inserts many documents, according the ordered behaviour.
import reactivemongo.bson.BSONDocument import reactivemongo.api.collections.BSONCollection def insertMany(coll: BSONCollection, docs: Iterable[BSONDocument]) = { val insert = coll.insert(ordered = true) insert.many(elements) // Future[MultiBulkWriteResult] }
Inserts a single document.
Inserts a single document.
import reactivemongo.bson.BSONDocument import reactivemongo.api.collections.BSONCollection def insertOne(coll: BSONCollection, doc: BSONDocument) = { val insert = coll.insert(ordered = true) insert.one(doc) }
Builder for insert operations.