Hi,

> > So, is there some sort of recipe for updating all records without
> > first loading them all into memory?

Maybe you can first do your doall but only retrieve the ids. Then
later on you can retrieve the entry by id and update it. Something
like this:

(defn update-db!
  []
  (doseq [id (doall (fetch :table :only [:id]))]
    (let [entry (fetch-one :table :where {:id id})]
      (update! :table entry (assoc entry :col 0)))))

My congomongo-fu is a bit rusty, but I hope it comes close.

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to