Permalink
Browse files

Add support for $comment in find().

  • Loading branch information...
1 parent 2fa1288 commit 07c59d5e5cfc28c71198c3df799f4c42cbf8fea8 Eric Kustarz committed Aug 8, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 asyncmongo/cursor.py
View
@@ -270,7 +270,7 @@ def find(self, spec=None, fields=None, skip=0, limit=0,
timeout=True, snapshot=False, tailable=False, sort=None,
max_scan=None, slave_okay=False,
_must_use_master=False, _is_command=False, hint=None, debug=False,
- callback=None):
+ comment=None, callback=None):
"""Query the database.
The `spec` argument is a prototype document that all results
@@ -367,6 +367,7 @@ def find(self, spec=None, fields=None, skip=0, limit=0,
self.__slave_okay = slave_okay
self.__explain = False
self.__hint = hint
+ self.__comment = comment
self.__debug = debug
# self.__as_class = as_class
self.__tz_aware = False #collection.database.connection.tz_aware
@@ -436,6 +437,8 @@ def __query_spec(self):
spec["$explain"] = True
if self.__hint:
spec["$hint"] = self.__hint
+ if self.__comment:
+ spec["$comment"] = self.__comment
if self.__snapshot:
spec["$snapshot"] = True
if self.__max_scan:

0 comments on commit 07c59d5

Please sign in to comment.