WatchQueryBuilder
Value members
Concrete methods
Sets the number of documents to return per batch.
Sets the number of documents to return per batch.
Overrides the Subscription#request value for setting the batch size, allowing for fine grained control over the underlying cursor.
- Value Params
- size
the batch size
- Returns
WatchQueryBuilder
- Since
1.8
Sets the collation options
Sets the collation options
- Value Params
- collation
the collation options to use
- Returns
WatchQueryBuilder
Sets the fullDocument value.
Sets the fullDocument value.
- Value Params
- fullDocument
the fullDocument
- Returns
WatchQueryBuilder
Sets the maximum await execution time on the server for this operation.
Sets the maximum await execution time on the server for this operation.
- Value Params
- maxAwaitTime
the max await time.
- Returns
WatchQueryBuilder
Sets the logical starting point for the new change stream.
Sets the logical starting point for the new change stream.
- Value Params
- resumeToken
the resume token
- Returns
WatchQueryBuilder
Similar to resumeAfter
, this option takes a resume token and starts a new change stream returning the first notification after
the token.
Similar to resumeAfter
, this option takes a resume token and starts a new change stream returning the first notification after
the token.
This will allow users to watch collections that have been dropped and recreated or newly renamed collections without missing any notifications.
Note: The server will report an error if both startAfter
and resumeAfter
are specified.
- Value Params
- startAfter
the startAfter resumeToken
- Returns
WatchQueryBuilder
The change stream will only provide changes that occurred after the specified timestamp.
The change stream will only provide changes that occurred after the specified timestamp.
Any command run against the server will return an operation time that can be used here.
The default value is an operation time obtained from the server before the change stream was created.
- Value Params
- startAtOperationTime
the start at operation time
- Returns
WatchQueryBuilder
- Since
1.9