2012-04-29 14:23:28 +00:00
# Monger, a modern Clojure MongoDB Driver
2017-11-18 04:53:18 +00:00
[](https://travis-ci.org/xingzhefeng/monger)
2012-07-25 08:57:23 +00:00
Monger is an idiomatic [Clojure MongoDB driver ](http://clojuremongodb.info ) for a more civilized age.
2011-08-04 12:01:26 +00:00
2018-12-02 19:18:53 +00:00
It has batteries included, offers powerful expressive query DSL,
strives to support modern MongoDB features and have the "look and feel" and
flexibility of the MongoDB shell.
Monger is built from for modern Clojure versions and sits on top of
the official MongoDB Java driver.
2012-01-30 22:36:09 +00:00
2011-09-10 16:28:13 +00:00
2011-10-19 15:32:55 +00:00
## Project Goals
There is one MongoDB client for Clojure that has been around since 2009. So, why create another one? Monger authors
2018-12-02 19:18:53 +00:00
wanted a client that would
2011-10-19 15:32:55 +00:00
2015-06-13 23:09:06 +00:00
* Support most of modern MongoDB features, focus on those that really matter.
2012-05-14 06:19:17 +00:00
* Be [well documented ](http://clojuremongodb.info ).
2012-07-29 19:44:42 +00:00
* Be [well tested ](https://github.com/michaelklishin/monger/tree/master/test/monger/test ).
2015-01-02 10:56:31 +00:00
* Target modern Clojure versions.
2012-07-29 19:44:42 +00:00
* Be as close to the Mongo shell query language as practical
2012-09-06 21:10:35 +00:00
* Integrate with libraries like Joda Time, [Cheshire ](https://github.com/dakrone/cheshire ), clojure.data.json, [Ragtime ](https://github.com/weavejester/ragtime ).
2012-04-10 21:42:07 +00:00
* Support URI connections to be friendly to Heroku and other PaaS providers.
2012-08-29 13:47:05 +00:00
* Not carry technical debt from 2009 forever.
2012-04-10 21:42:07 +00:00
* Integrate usage of JavaScript files and ClojureScript (as soon as the compiler gets artifact it is possible to depend on for easy embedding).
2011-10-19 15:32:55 +00:00
2011-12-31 00:39:58 +00:00
2012-05-21 11:46:08 +00:00
## Project Maturity
2018-07-21 04:26:09 +00:00
Monger is not a young project: started in July 2011, it is over 7
2013-08-17 13:55:15 +00:00
years old with active production use from week 1.
2012-05-21 11:46:08 +00:00
2012-02-03 22:03:24 +00:00
## Artifacts
2013-08-17 13:55:15 +00:00
Monger artifacts are [released to
Clojars](https://clojars.org/com.novemberain/monger). If you are using
Maven, add the following repository definition to your `pom.xml` :
2012-02-11 05:57:58 +00:00
2012-06-09 08:12:37 +00:00
``` xml
< repository >
< id > clojars.org< / id >
< url > http://clojars.org/repo< / url >
< / repository >
```
2012-02-11 05:57:58 +00:00
2012-06-09 08:12:37 +00:00
### The Most Recent Release
2012-02-03 22:03:24 +00:00
With Leiningen:
2018-12-08 19:54:23 +00:00
[com.novemberain/monger "3.5.0"]
2012-02-03 22:03:24 +00:00
With Maven:
< dependency >
< groupId > com.novemberain< / groupId >
< artifactId > monger< / artifactId >
2018-12-08 19:54:23 +00:00
< version > 3.5.0< / version >
2012-02-03 22:03:24 +00:00
< / dependency >
2012-06-09 08:12:37 +00:00
2012-04-29 14:23:28 +00:00
## Getting Started
2012-01-30 22:32:50 +00:00
2013-08-17 13:55:15 +00:00
Please refer to our [Getting Started
guide](http://clojuremongodb.info/articles/getting_started.html). Don't
hesitate to join our [mailing
list](https://groups.google.com/forum/#!forum/clojure-mongodb) and ask
questions, too!
2012-01-30 22:32:50 +00:00
2013-08-17 13:55:15 +00:00
## Documentation & Examples
2012-01-30 22:32:50 +00:00
2014-06-22 10:01:32 +00:00
Please see our [documentation guides site ](http://clojuremongodb.info/ ) and [API reference ](http://reference.clojuremongodb.info ).
2012-01-30 22:32:50 +00:00
2018-12-02 19:18:53 +00:00
Our [test suite ](https://github.com/michaelklishin/monger/tree/master/test/monger/test )
2013-08-17 13:55:15 +00:00
also has many code examples.
2012-01-30 22:32:50 +00:00
2012-07-29 19:44:42 +00:00
2013-08-17 13:55:15 +00:00
## Community
2018-12-02 19:18:53 +00:00
[Monger has a mailing list ](https://groups.google.com/forum/#!forum/clojure-mongodb ). Feel
2013-08-17 13:55:15 +00:00
free to join it and ask any questions you may have.
2012-01-30 22:32:50 +00:00
2013-08-17 13:55:15 +00:00
To subscribe for announcements of releases, important changes and so
on, please follow [@ClojureWerkz ](https://twitter.com/#!/clojurewerkz )
on Twitter.
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
## Supported Clojure versions
2012-01-30 22:32:50 +00:00
2018-12-02 19:18:53 +00:00
Monger requires Clojure 1.8+. The most recent
2013-08-17 13:55:15 +00:00
stable release is highly recommended.
2012-01-30 22:32:50 +00:00
2012-04-29 14:23:28 +00:00
## Continuous Integration Status
2012-01-30 22:32:50 +00:00
2014-12-17 02:28:36 +00:00
[](http://travis-ci.org/michaelklishin/monger)
2012-01-30 22:32:50 +00:00
2012-07-29 19:44:42 +00:00
## Monger Is a ClojureWerkz Project
Monger is part of the [group of Clojure libraries known as ClojureWerkz ](http://clojurewerkz.org ), together with
2015-06-13 23:09:06 +00:00
[Cassaforte ](http://clojurecassandra.info ), [Langohr ](http://clojurerabbitmq.info ), [Elastisch ](http://clojureelasticsearch.info ), [Quartzite ](http://clojurequartz.info ) and several others.
2012-07-29 19:44:42 +00:00
2012-01-30 22:32:50 +00:00
2012-02-03 22:03:24 +00:00
## Development
2012-01-30 21:52:50 +00:00
2012-03-13 17:38:42 +00:00
Monger uses [Leiningen 2 ](https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md ). Make sure you have it installed and then run tests against
2012-04-10 12:15:05 +00:00
supported Clojure versions using
2022-10-25 16:43:05 +00:00
2015-08-25 15:50:35 +00:00
./bin/ci/before_script.sh
2014-12-15 21:02:33 +00:00
lein all do clean, javac, test
2011-10-09 12:56:10 +00:00
2022-10-25 16:43:05 +00:00
Or, if you don't have mongodb installed, you can use docker
docker-compose up
./bin/ci/before_script_docker.sh
lein all do clean, javac, test
2012-02-03 22:03:24 +00:00
Then create a branch and make your changes on it. Once you are done with your changes and all tests pass, submit a pull request
on Github.
2011-10-09 12:56:10 +00:00
2011-09-08 20:27:49 +00:00
2011-08-04 12:01:26 +00:00
## License
2018-12-02 19:18:53 +00:00
Copyright (C) 2011-2018 [Michael S. Klishin ](http://twitter.com/michaelklishin ), Alex Petrov, and the ClojureWerkz team.
2011-08-04 12:01:26 +00:00
2013-04-04 19:51:46 +00:00
Double licensed under the [Eclipse Public License ](http://www.eclipse.org/legal/epl-v10.html ) (the same as Clojure) or
the [Apache Public License 2.0 ](http://www.apache.org/licenses/LICENSE-2.0.html ).