kmongo / org.litote.kmongo.coroutine / CoroutinePublisher

CoroutinePublisher

open class CoroutinePublisher<T : Any> (source)

Coroutine wrapper around Publisher.

Constructors

<init>

Coroutine wrapper around Publisher.

CoroutinePublisher(publisher: Publisher<T>)

Properties

publisher

open val publisher: Publisher<T>

Functions

consumeEach

iterates over all elements from the publisher

suspend fun consumeEach(action: suspend (T) -> Unit): Unit

toFlow

Provides a flow of not null elements from the publisher.

fun toFlow(): Flow<T>

toList

Provides a list of not null elements from the publisher.

suspend fun toList(): List<T>

Inheritors

CoroutineAggregatePublisher

Coroutine wrapper around AggregatePublisher.

class CoroutineAggregatePublisher<T : Any> : CoroutinePublisher<T>

CoroutineChangeStreamPublisher

Coroutine wrapper around ChangeStreamPublisher.

class CoroutineChangeStreamPublisher<TResult : Any> : CoroutinePublisher<ChangeStreamDocument<TResult>>

CoroutineDistinctPublisher

Coroutine wrapper around CoroutineDistinctPublisher.

class CoroutineDistinctPublisher<T : Any> : CoroutinePublisher<T>

CoroutineFindPublisher

Coroutine wrapper around CoroutineFindPublisher.

class CoroutineFindPublisher<T : Any> : CoroutinePublisher<T>

CoroutineListCollectionsPublisher

Coroutine wrapper around ListCollectionsPublisher.

class CoroutineListCollectionsPublisher<TResult : Any> : CoroutinePublisher<TResult>

CoroutineListIndexesPublisher

Coroutine wrapper around CoroutineListIndexesPublisher.

class CoroutineListIndexesPublisher<T : Any> : CoroutinePublisher<T>

CoroutineMapReducePublisher

Coroutine wrapper around MapReducePublisher.

class CoroutineMapReducePublisher<T : Any> : CoroutinePublisher<T>