severin-monger provides connection pooling for MongoDB by implementing the severin API.
A created resource holds a database connection (com.mongodb.MongoClient), a database instance (com.mongodb.DB) and the URI.
The library can be installed from Clojars using Leiningen:
; create pool:
(use 'severin.pool.monger)
(def pool (severin.core/make-pool))
; connect to MongoDB and use "test" database:
(def r (severin.core/create! pool "monger://localhost/test"))
; do some stuff:
(mc/find (:db r) "foo" {})
; dispose connection:
(severin.core/dispose! pool r)
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close