A better query example for the README [ci skip]

This commit is contained in:
Michael S. Klishin 2012-02-12 20:38:03 +04:00
parent 7a68d83d6c
commit 94f21e7597

View file

@ -216,13 +216,13 @@ for client libraries like Monger.
Here is what monger.query DSL feels like: Here is what monger.query DSL feels like:
``` clojure ``` clojure
(with-collection "docs" (with-collection "movies"
(find { :inception_year { $lt 2000 $gte 2011 } }) (find { :year { $lt 2010 $gte 2000 }, :revenue { $gt 20000000 } })
(fields [ :inception_year :name ]) (fields [ :year :title :producer :cast :budget :revenue ])
(sort-by { :revenue -1 })
(skip 10) (skip 10)
(limit 20) (limit 20)
(batch-size 50) (hint "year-by-year-revenue-idx")
(hint "my-index-name")
(snapshot)) (snapshot))
``` ```