Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created November 14, 2011 09:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/1363577 to your computer and use it in GitHub Desktop.
Save michaelklishin/1363577 to your computer and use it in GitHub Desktop.
Our new MongoDB query DSL in Monger, implemented in < 100 lines of Clojure
(with-collection "docs"
(find { :inception_year { $lt 2000 $gte 2011 } })
(fields { :inception_year 1 :name 1 })
(skip 10)
(limit 20)
(batch-size 50)
(hint "my-index-name")
(snapshot))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment