Skip to content

Commit a36a4b6

Browse files
committed
edits
1 parent ea067d5 commit a36a4b6

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

source/crud/update/replace.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Replace One Document Example: Full File
128128
This example performs the following actions on the ``restaurants``
129129
collection:
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

134134
Select 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+
177190
API Documentation
178191
-----------------
179192

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// begin replace
21
// Replaces the first document that matches a filter by using the Go driver
32
package 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

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// begin replace
21
// Replaces the first document that matches a filter by using the Go driver
32
package 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

0 commit comments

Comments
 (0)