Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
In a previous ticket DRIVERS-414, included Example 1-3. This ticket is to add the Example 4 sections to the existing example :
// Start Changestream Example 1
|
|
MongoCursor<Document> cursor = inventory.watch().iterator();
|
Document next = cursor.next();
|
|
// End Changestream Example 1
|
// Start Changestream Example 2
|
|
MongoCursor<Document> cursor =
|
inventory.watch().fullDocument(FullDocument.UPDATE_LOOKUP).iterator();
|
Document next = cursor.next();
|
|
// End Changestream Example 2
|
// Start Changestream Example 3
|
|
Document resumeToken = next.get("_id", Document.class);
|
MongoCursor<Document> cursor = inventory.watch().resumeAfter(resumeToken).iterator();
|
cursor.next();
|
|
// End Changestream Example 3
|
// Start Changestream Example 4
|
|
List<Bson> pipeline = singletonList(Aggregates.match(Filters.or(
|
Document.parse("{'fullDocument.username': 'alice'}"),
|
Filters.in("operationType", asList("delete")))));
|
|
// End Changestream Example 4
|
Attachments
Issue Links
- depends on
-
CDRIVER-2463 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
CSHARP-2148 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
CXX-1494 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
GODRIVER-194 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
JAVA-2732 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
MOTOR-186 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
NODE-1288 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
PHPLIB-310 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
PYTHON-1448 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
-
RUBY-1275 Add pipeline stage to ChangeStreams example for Docs
-
- Closed
-
- is related to
-
DRIVERS-414 ChangeStreams Examples for Docs
-
- Closed
-
-
DRIVERS-434 Provide code samples for MongoDB 3.6 page
-
- Closed
-
-
DRIVERS-537 Modify Change Stream Output Examples
-
- Closed
-
- related to
-
DRIVERS-682 Update change stream docs example for resume token access
-
- Closed
-