JvmMongoIterable

Implementation of MongoIterable based on MongoDB's MongoIterable.

To access the inner iterable, see asKotlinMongoIterable.

To convert an existing MongoDB iterable into an instance of this class, see asKtMongo.

Functions

Link copied to clipboard

Converts a KtMongo MongoIterable into a MongoDB MongoIterable.

Link copied to clipboard
Link copied to clipboard

Streams the results of this query into a Java Stream.

Link copied to clipboard
open override fun first(): Document

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

Link copied to clipboard
open override fun firstOrNull(): Document?

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

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

Executes action for each document returned by this query.

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

Reads the entirety of this response into a List.

Link copied to clipboard
Link copied to clipboard
open fun toSet(): Set<Document>

Reads the entirety of this response into a Set.

Link copied to clipboard
open override fun toString(): String