-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
ptch: add x-upsert header to upsert duplicate object #32
Conversation
791839a
to
1d23047
Compare
Hey Ankit, this looks good! There seems to be a type error and can you add tests for the upsert mode too? |
I think upgrading the |
Ah cool, lets upgrade postgrest-js also in this PR then. |
Should I upgrade it to the latest version, from the repo I see |
…ing upsert method
49f5b7c
to
b4a8913
Compare
Yup, that version should be fine. I don't think there were any breaking changes. |
The tests are failing for some reason. Not related to the test suites though. |
I ran the tests locally and they seem to be fine @ankitjena. I will debug why the Github actions are failing separately. Thanks for your contribution ❤️ |
Also @inian Should I create a issue in |
Do you want to help with this too Ankit? supabase/storage-js#7 (comment) |
Sure do |
What kind of change does this PR introduce?
feature
What is the current behavior?
Closes #21
Currently insert throws a duplicate key error when trying to insert an key that already exists.
What is the new behavior?
Adds a
x-upsert
header to the insert object api, which upserts the object when the value of the header istrue
.Screen recording