File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
source/includes/usage-examples/code-snippets Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func main() {
5353 Cuisine : "German" ,
5454 }
5555
56- // Deletes all documents that have a "runtime " value greater than 800
56+ // Deletes all documents that have a "Borough " value of "Queens" and a "Cuisine" value of "German"
5757 results , err := coll .DeleteMany (context .TODO (), filter )
5858 if err != nil {
5959 panic (err )
Original file line number Diff line number Diff line change @@ -33,19 +33,17 @@ func main() {
3333 }
3434 }()
3535
36- // begin deleteMany
3736 coll := client .Database ("sample_restaurants" ).Collection ("restaurants" )
3837 filter := bson.D {
3938 {"borough" , "Queens" },
4039 {"cuisine" , "German" },
4140 }
4241
43- // Deletes all documents that have a "runtime " value greater than 800
42+ // Deletes all documents that have a "borough " value of "Queens" and a "cuisine" value of "German
4443 results , err := coll .DeleteMany (context .TODO (), filter )
4544 if err != nil {
4645 panic (err )
4746 }
48- // end deleteMany
4947
5048 // Prints the number of deleted documents
5149 fmt .Printf ("Documents deleted: %d\n " , results .DeletedCount )
You can’t perform that action at this time.
0 commit comments