From 2a34be05adbc6a4009727173835f79257e6d7f44 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Wed, 20 Mar 2013 01:30:11 +0400 Subject: [PATCH] Add a few new MongoDB 2.4-specific operators to monger.operators --- ChangeLog.md | 12 ++++++++++++ src/clojure/monger/operators.clj | 3 +++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 4f818f7..9d3469e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,17 @@ ## Changes between 1.4.0 and 1.5.0 +### New Geospatial Operators + +`monger.operators` now defines a few more operators for convenience: + + * `$getWithin` + * `$getIntersects` + * `$near` + +Of course, these and any other new operators can be passed as strings (e.g. `"$near"`) +as well. + + ### monger.core/mongo-options Updates `monger.core/mongo-options` options are now up-to-date with the most recent diff --git a/src/clojure/monger/operators.clj b/src/clojure/monger/operators.clj index 61bd5ee..9facdb0 100644 --- a/src/clojure/monger/operators.clj +++ b/src/clojure/monger/operators.clj @@ -228,3 +228,6 @@ (defoperator $ifNull) (defoperator $cond) +(defoperator $geoWithin) +(defoperator $geoIntersects) +(defoperator $near) \ No newline at end of file