   (.findOne collection (ObjectId. s)))
 
 (defn distinct-values [#^DBCollection collection s]
-  (seq (.distinct collection #^String (name s))))
+  (seq (.distinct collection (name s))))
 
 (defn delete [#^DBCollection collection obj]
   (.remove collection (db-object obj)))

                            v)}))
                    (seq dbo))))

(defn connect [host & [port]]
  (Mongo. #^String host (or port 27017)))

(defn mongo-db [connection name]
  (.getDB connection name))

(defn collection
  ([db collection-name]
     (.getCollection db collection-name))
  ([mongo db-name collection-name]
     (collection (.getDB mongo db-name) collection-name)))

(defn drop-collection [#^DBCollection collection]

    (map clojure-object
         (.insert collection #^java.util.List (map db-object objs)))))

(defn update [#^DBCollection collection query obj & options]
  (let [o? #(has-option? options %)]
    (clojure-object (.update collection
                             (db-object query)
                             (db-object obj)
                             (o? :upsert)
                             (o? :multi)))))

(defn upsert [collection query obj]
  (update collection query obj :upsert))

(defn update-all [collection query obj]
  (update collection query obj :multi))

(defn include-keys [& keys]
  (apply merge (map (fn [k] {k 1}) (remove nil? keys))))
