Ditto for monger.collection/create-index

This commit is contained in:
Michael S. Klishin 2012-01-29 07:39:51 +04:00
parent b30071a2b3
commit 4d30f1625d

View file

@ -338,9 +338,12 @@
(monger.collection/create-index collection { \"language\" 1 })
"
[^String collection, ^Map keys]
([^String collection ^Map keys]
(let [^DBCollection coll (.getCollection monger.core/*mongodb-database* collection)]
(.createIndex coll (to-db-object keys))))
([^DB db ^String collection ^Map keys]
(let [^DBCollection coll (.getCollection db collection)]
(.createIndex coll (to-db-object keys)))))
;;