Package-level declarations

Functions

Link copied to clipboard
fun <T : Any> MongoCollection<T>.findAsFlow(): Flow<T>

Finds all documents in a MongoDB collection and returns them as a flow.

fun <T : Any> MongoCollection<T>.findAsFlow(query: Bson): Flow<T>

Finds documents in a MongoDB collection that match the specified BSON query and returns them as a flow.

Link copied to clipboard
fun <T : Any> MongoCollection<T>.insert(flow: Flow<T>, concurrency: Int = 1): Flow<InsertOneResult>

Inserts documents into a MongoDB collection using a flow of documents.

Link copied to clipboard
fun <T> MongoCollection<T>.insertMany(flow: Flow<T>, concurrency: Int = 1, options: InsertManyOptions = InsertManyOptions(), groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 500.milliseconds)): Flow<InsertManyResult>

Inserts many documents into a MongoDB collection using a flow of documents, batching them by the provided chunkStrategy.

Link copied to clipboard
fun <T : Any> MongoCollection<T>.replace(flow: Flow<Pair<Bson, T>>, concurrency: Int = 1): Flow<UpdateResult>

Replaces documents in a MongoDB collection using a flow of pairs containing a filter and a document.

fun <T : Any> MongoCollection<T>.replace(flow: Flow<T>, filter: Bson, concurrency: Int = 1): Flow<UpdateResult>

Replaces documents in a MongoDB collection using a flow of documents and a filter.

Link copied to clipboard
fun MongoCollection<Document>.update(flow: Flow<Document>, filter: Bson, concurrency: Int = 1): Flow<UpdateResult>

Updates documents in a MongoDB collection using a flow of update documents and a filter.

Link copied to clipboard
fun MongoCollection<Document>.updateMany(flow: Flow<Document>, filter: Bson, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 500.milliseconds)): Flow<UpdateResult>

Updates many documents in a MongoDB collection using a flow of update documents, a filter, and batching by the provided chunkStrategy.