From 2128f2cd6c59c8c9055f872e2c83d71a9bda75e3 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Sun, 22 Feb 2015 18:52:31 +0300 Subject: [PATCH] getLastError is gone in the 3.0 driver --- src/clojure/monger/core.clj | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/clojure/monger/core.clj b/src/clojure/monger/core.clj index b9e9fc0..73dfb94 100644 --- a/src/clojure/monger/core.clj +++ b/src/clojure/monger/core.clj @@ -200,21 +200,3 @@ ;; MongoDB Java driver could use a lot more specific type than Iterable but ;; it always uses DBCollection#find to popular result set. MK. (.count ^DBCursor (.results this)))) - -(defn ^DBObject get-last-error - "Returns the the error (if there is one) from the previous operation on this connection. - - The result of this command looks like: - - #\" - - The value for err will be null if no error occurred, or a description otherwise. - - Important note: when calling this method directly, it is undefined which connection \"getLastError\" is called on. - You may need to explicitly use a \"consistent Request\", see requestStart() For most purposes it is better not to call this method directly but instead use WriteConcern." - ([^DB database] - (.getLastError ^DB database)) - ([^DB database ^Integer w ^Integer wtimeout ^Boolean fsync] - (.getLastError ^DB database w wtimeout fsync)) - ([^DB database ^WriteConcern write-concern] - (.getLastError ^DB database write-concern)))