Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for replace_one #103

Open
krcurtis opened this issue Sep 19, 2019 · 0 comments
Open

support for replace_one #103

krcurtis opened this issue Sep 19, 2019 · 0 comments

Comments

@krcurtis
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant