MongoDB driver for Kotlin (coroutines) • opensavvy.ktmongo.coroutines • JvmMongoIterable
JvmMongoIterable¶
class JvmMongoIterable<Document : Any> : MongoIterable<Document>
Implementation of MongoIterable based on MongoDB's FindFlow.
To access the inner iterable, see asKotlinMongoIterable.
To convert an existing MongoDB iterable into an instance of this class, see asKtMongo.
Functions¶
asFlow¶
Streams the results of this response into a Flow.
asKotlinMongoIterable¶
@LowLevelApi
fun asKotlinMongoIterable(): FindFlow<Document>
Converts a KtMongo MongoIterable into a MongoDB FindFlow.
asSequence¶
open fun asSequence(): ERROR CLASS: Symbol not found for Sequence
first¶
Returns the first document found by this query, or throws an exception.
firstOrNull¶
open suspend override fun firstOrNull(): Document?
Returns the first document found by this query, or null if none were found.
forEach¶
Executes action for each document returned by this query.
toList¶
Reads the entirety of this response into a List.
toSequence¶
open fun toSequence(): ERROR CLASS: Symbol not found for Sequence
toSet¶
Reads the entirety of this response into a Set.