Skip to content

Commit 407d29e

Browse files
authored
DOCSP-26777 fix usage examples that were dependent on old examples (#205)
1 parent a6907bd commit 407d29e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/includes/usage-examples/code-snippets/watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func main() {
3434
}()
3535

3636
// begin watch
37-
coll := client.Database("insertDB").Collection("haikus")
37+
coll := client.Database("sample_restaurants").Collection("restaurants")
3838
pipeline := mongo.Pipeline{bson.D{{"$match", bson.D{{"operationType", "insert"}}}}}
3939
cs, err := coll.Watch(context.TODO(), pipeline)
4040
if err != nil {

source/usage-examples/watch.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Example
1414

1515
.. include:: /includes/usage-examples/run-example-tip.rst
1616

17-
The following example opens a change stream on the ``haikus`` collection
17+
The following example opens a change stream on the ``restaurants`` collection
1818
and prints inserted documents:
1919

2020
.. literalinclude:: /includes/usage-examples/code-snippets/watch.go
@@ -40,8 +40,8 @@ output:
4040
// results truncated
4141
{
4242
"_id": ...,
43-
"title": "Record of a Shriveled Datum",
44-
"text": "No bytes, no problem. Inserting a document. In MongoDB"
43+
"name": "8282",
44+
"cuisine": "Korean"
4545
}
4646

4747
.. important::

0 commit comments

Comments
 (0)