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() {
53
53
Cuisine : "German" ,
54
54
}
55
55
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"
57
57
results , err := coll .DeleteMany (context .TODO (), filter )
58
58
if err != nil {
59
59
panic (err )
Original file line number Diff line number Diff line change @@ -33,19 +33,17 @@ func main() {
33
33
}
34
34
}()
35
35
36
- // begin deleteMany
37
36
coll := client .Database ("sample_restaurants" ).Collection ("restaurants" )
38
37
filter := bson.D {
39
38
{"borough" , "Queens" },
40
39
{"cuisine" , "German" },
41
40
}
42
41
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
44
43
results , err := coll .DeleteMany (context .TODO (), filter )
45
44
if err != nil {
46
45
panic (err )
47
46
}
48
- // end deleteMany
49
47
50
48
// Prints the number of deleted documents
51
49
fmt .Printf ("Documents deleted: %d\n " , results .DeletedCount )
You can’t perform that action at this time.
0 commit comments