diff --git a/README.md b/README.md index 9b74856..34fa808 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,21 @@ options will be applied on top of this object. Again, read the [docs](https://cljdoc.org/d/mongo-driver-3/mongo-driver-3/CURRENT/api/mongo-driver-3.collection) for full API documentation. +### Using operators + +Many mongo queries take operators like `$eq` and `$gt`. These are exposed in the `mongo-driver-3.operator` namespace. + +``` clojure +(ns my.app + (:require [mongo-driver-3.collection :as mc] + [mongo-driver-3.operator :refer [$gt])) + +(mc/find db "test" {:a {$gt 3}}) + +;; This is equivalent to, but with less chance of error than: +(mc/find db "test" {:a {:$gt 3}}) +``` + ## License Released under the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/project.clj b/project.clj index bff117f..f231226 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject mongo-driver-3 "0.4.0" +(defproject mongo-driver-3 "0.5.0-SNAPSHOT" :description "A Clojure wrapper for the Java MongoDB driver 3.11+." :url "https://github.com/gnarroway/mongo-driver-3" :license {:name "The MIT License"