File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
includes/usage-examples/code-snippets Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func main() {
34
34
}()
35
35
36
36
// begin watch
37
- coll := client .Database ("insertDB " ).Collection ("haikus " )
37
+ coll := client .Database ("sample_restaurants " ).Collection ("restaurants " )
38
38
pipeline := mongo.Pipeline {bson.D {{"$match" , bson.D {{"operationType" , "insert" }}}}}
39
39
cs , err := coll .Watch (context .TODO (), pipeline )
40
40
if err != nil {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ Example
14
14
15
15
.. include:: /includes/usage-examples/run-example-tip.rst
16
16
17
- The following example opens a change stream on the ``haikus `` collection
17
+ The following example opens a change stream on the ``restaurants `` collection
18
18
and prints inserted documents:
19
19
20
20
.. literalinclude:: /includes/usage-examples/code-snippets/watch.go
@@ -40,8 +40,8 @@ output:
40
40
// results truncated
41
41
{
42
42
"_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 "
45
45
}
46
46
47
47
.. important::
You can’t perform that action at this time.
0 commit comments