I have currently a working filter for .DeleteMany. It deletes all entries where _id is in the given array vids:
filter := bson.D{{Key: "_id", Value: bson.D{{Key: "$in", Value: vids}}}}
res, err := DB.Collection("data").DeleteMany(context.TODO(), filter)
Now I want to enhance the filter and add some $and condition to only delete entries where _id is in the given array vids and(!) the value of providerid is 1234.
Sadly I'm stuck on how to do that in go. For me it is extremely hard to read and write such filters. Especially with all that bson.D, bson.M and []bson.D and the many curly brackets etc.
In SQL I would write DELETE FROM data WHERE _id IN( {list} ) AND providerid=1234;
Is there any SQL to golang mongodb filter converter?