-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Feat: implement on_conflict #113
Feat: implement on_conflict #113
Conversation
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.
Hey again @izqalan! 👋
I just have a couple of nits while this is in a draft. Otherwise, looks good!
@soedirgo updated with your suggestions. |
Awesome, thanks again @izqalan! |
🎉 This PR is included in version 0.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Seems like this await supabase.from('ips').upsert({ updated_at: new Date(), ip: request.ip, geo }, { onConflict: 'ip' }); |
How would I translate the following sql insert to the supabase js client?
Can I specify a composite key as a constraint for the conflict? |
@magick93 Replied on supabase/supabase#8093 |
What kind of change does this PR introduce?
Added
on_conflict
feature forinsert
method.What is the current behavior?
Missing
on_conflict
feature forinsert
method. #78What is the new behavior?
When inserting, if
upsert: true
and UNIQUE column specified onon_conflict: column
option seton_conflict
searchParams.Additional context
http://postgrest.org/en/v7.0.0/api.html?highlight=on%20conflict#on-conflict