-
Type: Task
-
Resolution: Works as Designed
-
Priority: Minor - P4
-
None
-
Affects Version/s: 0.3.0
-
Component/s: API, BSON, Documentation
-
None
-
Environment:Mac OS
Using DeleteMany with more than one bson.D always generates an error.
In the examples, it's possible to find a DeleteMany example but it actually deletes only one bson.D:
result, err := coll.DeleteMany(context.Background(), bson.D{{"status", "A"},},)
But what if I want to delete more documents?
I tried with:
[]interface{}{ bson.D{"_id" : "someId"}, bson.D{"_id" : "someOtherId"} }
But I got: cannot transform type []interface{} to a *bsonx.Document
And even with:
[]bson.D{ bson.D{"_id" : "someId"}, bson.D{"_id" : "someOtherId"} }
But I got*: cannot transform type []primitive.D to a bsonx.Document
I feel like it's also needed a proper example & the API of this method should be similar to InsertMany.