Skip to content

CoroutineMongoIterable

Streaming-capable iterable cursor to read data from the database.

The Coroutine client provides a coroutine-aware API which internally uses the official Kotlin driver.

External resources

Inheritors

Functions

asFlow

abstract fun asFlow(): Flow<Document>

asSequence

first

abstract suspend fun first(): Document

firstOrNull

abstract suspend fun firstOrNull(): Document?

forEach

abstract suspend fun forEach(action: suspend (Document) -> Unit)

map

open override fun <Out : Any> map(transform: suspend (Document) -> Out): CoroutineMongoIterable<Out>

toList

open suspend fun toList(): List<Document>

toSequence

toSet

open suspend fun toSet(): Set<Document>