kmongo / org.litote.kmongo.coroutine / CoroutineListCollectionsPublisher

CoroutineListCollectionsPublisher

class CoroutineListCollectionsPublisher<TResult : Any> : CoroutinePublisher<TResult> (source)

Coroutine wrapper around ListCollectionsPublisher.

Constructors

<init>

Coroutine wrapper around ListCollectionsPublisher.

CoroutineListCollectionsPublisher(publisher: ListCollectionsPublisher<TResult>)

Properties

publisher

val publisher: ListCollectionsPublisher<TResult>

Functions

batchSize

Sets the number of documents to return per batch.

fun batchSize(batchSize: Int): CoroutineListCollectionsPublisher<TResult>

filter

Sets the query filter to apply to the query.

fun filter(filter: Bson): CoroutineListCollectionsPublisher<TResult>

first

Helper to return a publisher limited to the first result.

suspend fun first(): TResult?

maxTime

Sets the maximum execution time on the server for this operation.

fun maxTime(maxTime: Long, timeUnit: TimeUnit): CoroutineListCollectionsPublisher<TResult>