mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-05-22 15:53:36 +00:00
Invoke onclose at the end of an array deleting
This commit is contained in:
@@ -52,6 +52,8 @@ func (d *Database) DeleteArray(target interface{}, filters ...interface{}) (err
|
||||
|
||||
composed.And(primitive.M{"_id": primitive.M{"$in": ids}})
|
||||
|
||||
defer composed.OnClose().Invoke(ctx, target)
|
||||
|
||||
result, err := collection.DeleteMany(ctx, composed.M(), opts)
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user