suspend fun <reified T : Any> CoroutineCollection<T>.insertOne(document: String, options: InsertOneOptions = InsertOneOptions()): InsertOneResult
(source)
Inserts the provided document. If the document is missing an identifier, the driver should generate one.
document
- the document to insert
options
- the options to apply to the operation
suspend fun <reified T : Any> CoroutineCollection<T>.insertOne(clientSession: ClientSession, document: String, options: InsertOneOptions = InsertOneOptions()): InsertOneResult
(source)
Inserts the provided document. If the document is missing an identifier, the driver should generate one.
clientSession
- the client session with which to associate this operation