fun <reified T : Any> watch(pipeline: List<Bson> = emptyList()): CoroutineChangeStreamPublisher<T>
(source)
Creates a change stream for this collection.
pipeline
- the aggregation pipeline to apply to the change stream
Parameters
Return
the change stream iterable
Mongodb
.driver.manual reference/operator/aggregation/changeStream $changeStream
Since
1.6
fun <reified T : Any> watch(clientSession: ClientSession, pipeline: List<Bson>): CoroutineChangeStreamPublisher<T>
(source)
Creates a change stream for this collection.
clientSession
- the client session with which to associate this operation
pipeline
- the aggregation pipeline to apply to the change stream
Parameters
Return
the change stream iterable
Mongodb
.driver.manual reference/operator/aggregation/changeStream $changeStream
Mongodb
.server.release 3.6
Since
1.7