Permalink
Browse files

Merge pull request #49 from sfjuggernaut/comment_field

Add support for $comment in find().
  • Loading branch information...
2 parents 4f80d5b + 07c59d5 commit ad8e8fd00db1099ea217d852de4cc583bc371152 @jehiah jehiah committed Jan 11, 2013
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
@@ -370,6 +370,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
@@ -439,6 +440,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 ad8e8fd

Please sign in to comment.