Browse files

allow special query contents

  • Loading branch information...
1 parent 321c559 commit b538f033459c07604f41d00aa62201eb9fdb1568 @rep committed Aug 25, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 evnet/mongodb.py
View
5 evnet/mongodb.py
@@ -121,9 +121,10 @@ def command(self, db, cmd, value=1, **kwargs):
self.pqs[reqid] = (p, '{0}.$cmd'.format(db), [])
return p
- def query(self, coll, q, limit=0, fields=None):
+ def query(self, coll, q, limit=0, fields=None, special={}):
p = Promise()
- reqid = self._sonquery(coll, bson.SON({'$query': q}), limit=limit, fields=fields)
+ special.update({'$query': q})
+ reqid = self._sonquery(coll, bson.SON(special), limit=limit, fields=fields)
self.pqs[reqid] = (p, coll, [])
return p

0 comments on commit b538f03

Please sign in to comment.