reactivemongo.api.collections.InsertOps
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) }
(insertBuilder: StringAdd).self
(insertBuilder: StringFormat).self
(insertBuilder: ArrowAssoc[GenericCollection.InsertBuilder]).x
(Since version 2.10.0) Use leftOfArrow
instead
(insertBuilder: Ensuring[GenericCollection.InsertBuilder]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Builder for insert operations.