ChangeStreamOps
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait GenericCollection[P]
- Self type
Members list
Type members
Classlikes
A builder for the watch
collection helper,
which allows to consume the collection's ChangeStream.
A builder for the watch
collection helper,
which allows to consume the collection's ChangeStream.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Value members
Concrete methods
'''EXPERIMENTAL:''' Prepares a builder for watching the change stream of this collection.
'''EXPERIMENTAL:''' Prepares a builder for watching the change stream of this collection.
'''Note:''' The target mongo instance MUST be a replica-set (even in the case of a single node deployement).
import reactivemongo.api.Cursor
import reactivemongo.api.bson.BSONDocument
import reactivemongo.api.bson.collection.BSONCollection
def events(coll: BSONCollection): Cursor[BSONDocument] =
coll.watch[BSONDocument]().cursor
Attributes
- T
the type into which Change Events are deserialized
- fullDocumentStrategy
if set to UpdateLookup, every update change event will be joined with the ''current'' version of the relevant document.
- maxAwaitTimeMS
The maximum amount of time in milliseconds the server waits for new data changes before returning an empty batch. In practice, this parameter controls the duration of the long-polling behavior of the cursor.
- offset
the change stream offset
- pipeline
The sequence of aggregation stages to apply on events in the stream (see MongoDB documentation for a list of valid stages for a change stream).
- reader
the reader of the resulting change events
- Since:
MongoDB 3.6