[GODRIVER-194] Add pipeline stage to ChangeStreams example for Docs Created: 12/Jan/18  Updated: 28/Oct/23  Resolved: 21/Feb/19

Status: Closed
Project: Go Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 1.0.0-rc1

Type: Task Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-436 Add pipeline stage to ChangeStreams e... Closed

 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



 Comments   
Comment by Githook User [ 21/Feb/19 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-194 add ChangeStream examples for docs

Change-Id: Ifd84577c877ef2738f555eb8eadc4cb192fda42c
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/bda3cf7300f30675075fa0f8c3d948fbe0499439

Comment by Isabella Siu (Inactive) [ 20/Feb/19 ]

code review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/445629/2

Comment by Ian Whalen (Inactive) [ 07/Jan/19 ]

michele.knaub same as GODRIVER-422 - looking to get this onto the DOCS team plate based on a convo scott.lhommedieu.

Generated at Thu Feb 08 08:33:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.