The ClojureWerkz Blog

News and updates about ClojureWerkz projects

Monger 1.6.0-beta3 Is Released

TL;DR

Monger is an idiomatic Clojure MongoDB driver for a more civilized age. It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and has sane defaults. It also has solid documentation.

1.6.0-beta3 is a milestone completely backwards-compatible release that includes updated dependencies, an alternative API that makes it easier to work with multiple databases and a few other minor features.

Changes between 1.5.0 and 1.6.0

monger.multi.collection

monger.multi.collection is a new namespace with functions that are very similar to those in the monger.collection namespace but always take a database reference as an explicit argument.

They are supposed to be used in cases when relying on monger.core/*mongodb-database* is not enough.

Erik Bakstad contributed most of this work.

MongoDB Java Driver Update

MongoDB Java driver dependency has been updated to 2.11.2.

monger.core/drop-db

monger.core/drop-db is a new function that drops a database by name.

One More Cache Implementation

monger.cache/db-aware-monger-cache-factory will return a MongoDB-backed clojure.core.cache implementation that can use any database:

1
2
3
4
5
6
7
(require '[monger.core  :as mg])
(require '[monger.cache :as cache])

(let [db   (mg/get-db "altcache")
      coll "cache_entries"
      c    (cache/db-aware-monger-cache-factory db coll)]
  (comment "This cache instance will use the altcache DB"))

Change Log

Monger change log is available on GitHub.

Monger is a ClojureWerkz Project

Monger is part of the group of libraries known as ClojureWerkz, together with

  • Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Monger, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

@michaelklishin on behalf of the ClojureWerkz Team