kmongo / org.litote.kmongo.reactor / com.mongodb.reactivestreams.client.MongoCollection / insert

insert

fun <reified T : Any> MongoCollection<T>.insert(document: T, options: InsertOneOptions = InsertOneOptions()): Mono<Void> (source)

Inserts the provided object. If the document is missing an identifier, the driver should generate one.

Parameters

document - the document to insert

options - the options to apply to the operation