-
Notifications
You must be signed in to change notification settings - Fork 2.8k
support where clause in on_conflict of insert mutation (close #2795) #3002
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 where clause in on_conflict of insert mutation (close #2795) #3002
Conversation
|
Deploy preview for hasura-docs ready! Built with commit 4d4b506 |
|
Review app for commit 86ed944 deployed to Heroku: https://hge-ci-pull-3002.herokuapp.com |
86ed944 to
cc423c2
Compare
|
Review app for commit cc423c2 deployed to Heroku: https://hge-ci-pull-3002.herokuapp.com |
lexi-lambda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from a couple minor comments.
marionschleifer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lexi-lambda said everything 🙂
cc423c2 to
879d53b
Compare
| Update selected columns on conflict using a filter | ||
| -------------------------------------------------- | ||
| Insert a new object in the ``article`` table, or if the primary key constraint ``article_pkey`` is violated, update | ||
| the columns specified in ``update_columns`` only if provided the ``where`` condition is met: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this was my fault—I told you the wrong thing. The “the” in this sentence should come before the word “provided,” so it should read “update the columns specified in update_columns only if the provided where condition is met.” I’ve made the change myself, though, so you don’t have to worry about it.
|
Review app for commit 4d4b506 deployed to Heroku: https://hge-ci-pull-3002.herokuapp.com |
|
Review app https://hge-ci-pull-3002.herokuapp.com is deleted |
Description
Support
whereclause inon_conflictinput object. It is optional. Thiswherecondition applies to old data.For more details, refer to issue #2795
Affected components
Related Issues
closes #2795
Solution and Design
wherefield inon_conflictinput objectwherefield using text encoding of input values.wherewith update filter usingANDoperatorSteps to test and verify
Follow any test case added in this PR