Browse files

support explain

  • Loading branch information...
1 parent efe99b9 commit d7eb5416a26d88621c8c92e0228c29270d155f87 @kchodorow kchodorow committed Dec 6, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 handlers.py
View
3 handlers.py
@@ -227,6 +227,9 @@ def _find(self, args, out, name = None, db = None, collection = None):
cursor.sort(stupid_sort)
+ if 'explain' in args and bool(args['explain'][0]):
+ out(json.dumps({"results" : [cursor.explain()], "ok" : 1}, default=json_util.default))
+
if not hasattr(self, "cursors"):
setattr(self, "cursors", {})

0 comments on commit d7eb541

Please sign in to comment.