I have a web app using Clojure, Clojurescript, and Monger. Documents are uploaded and stored in Mongo via GridFS. The same files can be requested for download; at the moment this is accomplished by writing the file to (the server's) disk and serving…
I am using Clojure and Monger
It works fine, and I group functions by the collection they relate to.
Therefore, every file begins like this :
(ns img-cli.model.mycollectionname
(:require [monger.core :as mg]
…
I have a function that takes in list of entry and save it to mongo using monger.
What is strange is that only the one record will be updated and the rest ignored unless I specify multi:true.
I don't understand why the multi flag is necessary for…
I'm querying a mongo collection from monger doing something like this:
(with-collection "my-collection"
(find {})
(limit 1000)
(batch-size 10))
I'm then iterating over the resulting cursor like this:
(doseq [item cursor]
(do-something…
I'm using Monger to connect to Mongo. I want to run
db.collection.find().forEach(function(x) { db.collection-two.insert(...) })
I can't see a relevant 'for each' entry in the Monger docs or a way to pass in JavaScript to insert into another…
I created a compojure app using lein new compojure mongotest with lein 2.0, and a Procfile web: lein ring server-headless $PORT. This worked fine, but now when I add
(def mongolab-url (System/getenv "MONGOLAB_URI"))
(println…