MongoIterable

Streaming-ready iterable client to read data from the database.

Inheritors

Functions

Link copied to clipboard
abstract fun asFlow(): <Error class: unknown class><Document>

Streams the results of this response into a Flow.

Link copied to clipboard
open fun asSequence(): <Error class: unknown class><Document>
Link copied to clipboard
open suspend fun first(): Document

Returns the first document found by this query, or throws an exception.

Link copied to clipboard
abstract suspend fun firstOrNull(): Document?

Returns the first document found by this query, or null if none were found.

Link copied to clipboard
abstract suspend fun forEach(action: suspend (Document) -> Unit)

Executes action for each document returned by this query.

Link copied to clipboard
open suspend fun toList(): List<Document>

Reads the entirety of this response into a List.

Link copied to clipboard
open fun toSequence(): <Error class: unknown class><Document>
Link copied to clipboard
open suspend fun toSet(): Set<Document>

Reads the entirety of this response into a Set.