Skip to content

SyncMongoIterable

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

asSequence

first

abstract fun first(): Document

firstOrNull

abstract fun firstOrNull(): Document?

forEach

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

map

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

toList

open fun toList(): List<Document>

toSequence

toSet

open fun toSet(): Set<Document>