File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed
includes/usage-examples/code-snippets Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ Replace One Document Example: Full File
128128This example performs the following actions on the ``restaurants``
129129collection:
130130
131- - Matches a document in which the ``name`` is "Rizzo's Fine Pizza"
131+ - Matches a document in which the value of ``name`` is "Rizzo's Fine Pizza"
132132- Replaces the matched document with a new document
133133
134134Select the **Struct** or **bson.D** tab to see the corresponding code:
@@ -154,7 +154,6 @@ Select the **Struct** or **bson.D** tab to see the corresponding code:
154154
155155 Number of documents replaced: 1
156156
157-
158157 .. tab :: bson.D
159158 :tabid: bsonDExample
160159
@@ -174,6 +173,20 @@ Select the **Struct** or **bson.D** tab to see the corresponding code:
174173
175174 Number of documents replaced: 1
176175
176+ Expected Result
177+ ~~~~~~~~~~~~~~~
178+
179+ After you run the full example, you can find the following replaced document
180+ in the ``restaurants`` collection:
181+
182+ .. code-block:: none
183+
184+ {
185+ "_id" : ObjectId("..."),
186+ "name" : "Rizzo's Pizza",
187+ "cuisine" : "Pizza/American"
188+ }
189+
177190API Documentation
178191-----------------
179192
Original file line number Diff line number Diff line change 1- // begin replace
21// Replaces the first document that matches a filter by using the Go driver
32package main
43
@@ -66,5 +65,3 @@ func main() {
6665 // When you run this file for the first time, it should print:
6766 // Number of documents replaced: 1
6867}
69-
70- // end replace
Original file line number Diff line number Diff line change 1- // begin replace
21// Replaces the first document that matches a filter by using the Go driver
32package main
43
@@ -57,5 +56,3 @@ func main() {
5756 // When you run this file for the first time, it should print:
5857 // Number of documents replaced: 1
5958}
60-
61- // end replace
You can’t perform that action at this time.
0 commit comments