MongoDB driver for Kotlin (synchronous) • opensavvy.ktmongo.sync • MongoIterable
MongoIterable¶
interface MongoIterable<Document : Any>
Streaming-ready iterable client to read data from the database.
Inheritors¶
- JvmMongoIterable
Functions¶
asSequence¶
open fun asSequence(): <Document>
first¶
Returns the first document found by this query, or throws an exception.
firstOrNull¶
abstract 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(): <Document>
toSet¶
Reads the entirety of this response into a Set.