Skip to content

Add findOneAndDelete, findOneAndModify to MongoCollection, move most of usages to it. #759

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

Merged
merged 5 commits into from
Mar 2, 2016

Conversation

nlutsenko
Copy link
Contributor

  • Add findOneAndDelete
    Atomic find and delete if it exists, which directly translates to Postgres
  • Add findOneAndModify
    Atomic find and update if it exists, which also translates to Postgres.
    There is a behavior difference here compared to before - it returns the object with the changes applied, but that's ok and actually simplifies our stuff by a lot.

Move everything, but the Schema.js to it (need few more changes there to support this).

cc @lacker since you are going to be probably interested in this.

@nlutsenko nlutsenko force-pushed the nlutsenko.storage.findAndDoMagic branch from 541029c to 4049ce4 Compare March 2, 2016 08:29
@facebook-github-bot
Copy link

@nlutsenko updated the pull request.

nlutsenko added a commit that referenced this pull request Mar 2, 2016
…oMagic

Add findOneAndDelete, findOneAndModify to MongoCollection, move most of usages to it.
@nlutsenko nlutsenko merged commit bb80e5d into master Mar 2, 2016
@nlutsenko nlutsenko deleted the nlutsenko.storage.findAndDoMagic branch March 2, 2016 22:36
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

Successfully merging this pull request may close these issues.

3 participants