connect-couchdb
connect-couchdb copied to clipboard
add an option to deal with couchdb conflicts
In the case where two concurrent commits are made on the same session, a conflict might occurs. I see three ways to deals with it :
- throw an exception (actual scenario, but it should be better handled)
- ignore it
- erase the actual stored session
Any interest in this issue getting addressed? I can see how different users would want to either ignore or throw, based on how important their session data is. Consider a PR?
I gladly accept every well tested PRs. :)
I've added basic support for ignoring conflicts at https://github.com/eddiesholl/connect-couchdb/tree/conflicts, I'm getting a few other test breakages that I don't think are caused by my changes. If you have a moment do you mind trying it out?
Do you think support for passing in a conflict handling function is required here as well?