From d982d27caaa46596527420c951e4eb5f73d441df Mon Sep 17 00:00:00 2001 From: Toby Hede Date: Tue, 21 Feb 2012 13:01:42 +1100 Subject: [PATCH] core/command accepts db as explicit parameter option --- src/monger/core.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/monger/core.clj b/src/monger/core.clj index 7ee65b0..b248411 100644 --- a/src/monger/core.clj +++ b/src/monger/core.clj @@ -167,9 +167,11 @@ For :distinct, :count, :drop, :dropIndexes, :mapReduce we suggest to use monger/collection #distinct, #count, #drop, #dropIndexes, :mapReduce respectively. " - [^Map cmd] - (.command ^DB *mongodb-database* ^DBObject (to-db-object cmd))) - + ([^Map cmd] + (.command ^DB *mongodb-database* ^DBObject (to-db-object cmd))) + ([^DB database ^Map cmd] + (.command ^DB database ^DBObject (to-db-object cmd))) + ) (defprotocol Countable (count [this] "Returns size of the object"))