selectel / mongoDB-haskell

MongoDB driver for Haskell
http://hackage.haskell.org/package/mongoDB
Apache License 2.0
21 stars 11 forks source link

findAndModify helper #2

Closed gregwebs closed 11 years ago

gregwebs commented 12 years ago

Many drivers implement some kind of helper for findAndModify. I am going to try and use with runCommand at the moment, will see if I can abstract a helper

gregwebs commented 12 years ago

I used a findAndModifyOne helper: https://github.com/yesodweb/persistent/blob/master/persistent-mongoDB/Database/Persist/MongoDB.hs#L246

gregwebs commented 11 years ago

do you want me to send a pull request with this code?

knsd commented 11 years ago

Hello, Greg.

If you send pull request, i will update hackage version.

Actually I want to rewrite this driver from scratch with bresson and resource-pool because this package is a little difficult to maintain and develop.

gregwebs commented 11 years ago

Ok, I will send a pull request. It seems that the changes you want to make don't necessarily require a rewrite from scratch. I would think you could switch out BSON for Bresson without a huge impact on the code base or end users. persistent-mongoDB is already using resource-pool on top of mongoDB although it would be nice to simplify that.