jmikola / mongoqp

A frontend for MongoDB's query profiler collection.
MIT License
170 stars 25 forks source link

Expand important objects inside query #6

Closed tahajahangir closed 11 years ago

tahajahangir commented 11 years ago

With new versions of mongo, query commands may include query objects, with $query key, that real query fields stored in $query.

Also, query command may include $order_by, which is also a part of query, and is important in query plan.

Also findAndModify command includes query and sort keys.

So, expand these four special keys in any case (not only when they have a $op).

jmikola commented 11 years ago

I believe this change depended on #5, where you were storing the entire command object in the query value, which is cleaned and emitted. I change the emit structure a bit in #8, so the query is still just the underlying query document (e.g. the specific option of a findAndModify command).