Closed gregwebs closed 11 years ago
I used a findAndModifyOne helper: https://github.com/yesodweb/persistent/blob/master/persistent-mongoDB/Database/Persist/MongoDB.hs#L246
do you want me to send a pull request with this code?
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.
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.
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