Skip to content

Commit

Permalink
code for findAndModify
Browse files Browse the repository at this point in the history
  • Loading branch information
pinguo-guzhongzhi committed Sep 25, 2024
1 parent 718d471 commit eb49096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adapter/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func (m *Mongodb) FindAndModify(query interface{}, change qmgo.Change, result in
m.Context().ProfileStart(profile)
defer m.Context().ProfileStop(profile)
ctx := context.Background()
q := m.Collection.Find(ctx, query)
col := m.client.MClient.Database(m.db).Collection(m.coll)
q := col.Find(ctx, query)
q, err := handleOptions(q, options...)
if err != nil {
return err
Expand Down

0 comments on commit eb49096

Please sign in to comment.