persistent-mongoDB 1.1.5.2 → 1.1.6
raw patch · 2 files changed
+6/−3 lines, 2 files
Files
Database/Persist/MongoDB.hs view
@@ -45,6 +45,7 @@ , Connection , MongoConf (..) , MongoBackend+ , MongoAuth (..) -- ** using raw MongoDB pipes , PipePool , createMongoDBPipePool@@ -353,11 +354,13 @@ "query" DB.:= DB.Doc [_id DB.:= DB.ObjId objectId], "update" DB.:= DB.Doc updates ]- return $ case DB.lookup "err" (DB.at "lastErrorObject" result) result of- Just e -> Left e+ return $ case findErr result of Nothing -> case DB.lookup "value" result of Nothing -> Left "no value field" Just doc -> Right doc+ Just e -> Left e+ where+ findErr result = DB.lookup "err" (DB.at "lastErrorObject" result) instance (Applicative m, Functor m, Trans.MonadIO m, MonadBaseControl IO m) => PersistQuery (DB.Action m) where update _ [] = return ()
persistent-mongoDB.cabal view
@@ -1,5 +1,5 @@ name: persistent-mongoDB-version: 1.1.5.2+version: 1.1.6 license: MIT license-file: LICENSE author: Greg Weber <greg@gregweber.info>