MongoIterable

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

Inheritors

Functions

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

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

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

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

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

Executes action for each document returned by this query.

Link copied to clipboard
open 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 fun toSet(): Set<Document>

Reads the entirety of this response into a Set.