From 12f48b058ba7d91b473ce7e6bd5d77c14b41ac17 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Sat, 9 Jun 2012 00:36:07 +0400 Subject: [PATCH] Remove type hints that can be inferred by the compiler, part 3 --- src/monger/query.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/monger/query.clj b/src/monger/query.clj index c9224e3..8e7d59e 100644 --- a/src/monger/query.clj +++ b/src/monger/query.clj @@ -20,7 +20,7 @@ ;; Implementation ;; -(def ^{ :dynamic true } *query-collection*) +(def ^{:dynamic true} *query-collection*) ;; ;; Cursor/chain methods @@ -59,13 +59,13 @@ (merge (empty-query) { :collection coll }))) (defn exec - [{ :keys [collection query fields skip limit sort batch-size hint snapshot read-preference keywordize-fields] :or { limit 0 batch-size 256 skip 0 } }] - (let [cursor (doto ^DBCursor (.find ^DBCollection collection (to-db-object query) (as-field-selector fields)) + [{ :keys [^DBCollection collection query fields skip limit sort batch-size hint snapshot read-preference keywordize-fields] :or { limit 0 batch-size 256 skip 0 } }] + (let [cursor (doto (.find collection (to-db-object query) (as-field-selector fields)) (.limit limit) (.skip skip) (.sort (to-db-object sort)) (.batchSize batch-size) - (.hint ^DBObject (to-db-object hint)))] + (.hint (to-db-object hint)))] (when snapshot (.snapshot cursor)) (when read-preference