Package-level declarations

Properties

Link copied to clipboard
val InsertOneResult.documentId: DocumentId?
Link copied to clipboard
val InsertManyResult.documentIds: List<DocumentId>
Link copied to clipboard
val UpdateResult.upsertedDocumentId: DocumentId?

Functions

Link copied to clipboard
fun <T : Any> FindFlow<T>.sort(sort: SortBuilder<T>.() -> Bson): FindFlow<T>
Link copied to clipboard
inline suspend fun <T> ClientSession.transaction(options: TransactionOptions.Builder.() -> Unit = {}, fn: suspend (session: ClientSession) -> T): Result<T>

Automatically starts a transaction, commits if no exceptions are thrown and aborts the transaction otherwise.

Link copied to clipboard
fun MongoClient.withCodecRegistry(fn: RegistryBuilder.() -> Unit): MongoCluster
fun <T : Any> MongoCollection<T>.withCodecRegistry(fn: RegistryBuilder.() -> Unit): MongoCollection<T>
fun MongoDatabase.withCodecRegistry(fn: RegistryBuilder.() -> Unit): MongoDatabase