SyncMongoFindIterable

interface SyncMongoFindIterable<Document : Any> : MongoIterable<Document> (source)

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 FindIterable from the official driver. See also SyncMongoAggregateIterable.

External resources

Functions

Link copied to clipboard
abstract fun asOfficial(): FindIterable<Document>

Obtains the underlying MongoDB flow from the official Kotlin driver.

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