support for replace_one
krcurtis opened this issue · 0 comments
krcurtis commented
Hi,
I have some Python code that I'd like to translate to Haskell where I was able to use replace_one, and check that the calling process actually made the update (as opposed to another process trying to make a similar update concurrently):
result = db.tasks.replace_one( ... )
if 1 == result.matched_count and 1 == result.modified_count:
print("Updated item!")
I tried using replace from Database.MongoDB.Query but it doesn't seem to return any information about whether it succeed or not. I'm guessing some support needs to be added for that, or if not, how do I check that?
Thanks!