MongoDB driver for Kotlin (coroutines) • opensavvy.ktmongo.coroutines • JvmMongoCollection • insertMany
insertMany¶
open suspend override fun insertMany(documents: Iterable<Document>, options: InsertManyOptions<Document>.() -> Unit)
Inserts multiple documents
in a single operation.
Example¶
Note that insertOne
ignores filtered collection. That is, insertOne
on a filtered collection behaves exactly the same as the same insertOne
on the underlying real collection.
External resources¶
See also¶
JvmMongoCollection.insertOne
Insert a single document.