CoroutineMongoFindIterable

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.

This type wraps a FindFlow from the official driver. See also CoroutineMongoAggregateIterable.

External resources

Functions

Link copied to clipboard
abstract fun asFlow(): Flow<Document>
Link copied to clipboard
abstract fun asOfficial(): FindFlow<Document>

Obtains the underlying MongoDB flow from the official Kotlin driver.

Link copied to clipboard
Link copied to clipboard
abstract suspend fun first(): Document
Link copied to clipboard
abstract suspend fun firstOrNull(): Document?
Link copied to clipboard
abstract suspend fun forEach(action: suspend (Document) -> Unit)
Link copied to clipboard
open suspend fun toList(): List<Document>
Link copied to clipboard
Link copied to clipboard
open suspend fun toSet(): Set<Document>