Exists a function which does not return the result of a query but the Mongo Call?

13 views
Skip to first unread message

Marcus Lindner

unread,
Apr 1, 2014, 10:49:18 AM4/1/14
to clojure...@googlegroups.com
Hi,

exists a function which takes a monger function and returns the created Mongo call insteat of the result?

For example like this:
=> (getCall (mc/insert "documents" {:first_name "John" :last_name "Lennon"})
"db.documents.find {first_name : "John", last_name "Lennon" }"

I testing some monger function and verify the result of the monger function on an other shell. (In my case I use the Robomongo shell or the Mongo Shell)
Such a function would make the testing easier, because I only need to copy and paste the returned String.

Ahmad Hammad

unread,
Oct 13, 2014, 7:22:01 AM10/13/14
to clojure...@googlegroups.com
+1. would be quite helpful. Similar to the Rails .to_sql
Reply all
Reply to author
Forward
0 new messages