values
dict to use upsert.The values to insert. Pass an dict to insert a single row or an list to insert multiple rows.
The property to use to get the count of rows returned.
Either 'minimal' or 'representation'. Defaults to 'representation'.
Whether duplicate rows should be ignored.
Specified columns to be made to work with UNIQUE constraint.
Make missing fields default to `null`. Otherwise, use the default value for the column. Only applies for bulk inserts.
response = (
supabase.table("countries")
.upsert(\{"id": 1, "name": "Australia"\})
.execute()
)
response = (
supabase.table("countries")
.upsert([\{"id": 1, "name": "Albania"\}, \{"id": 2, "name": "Algeria"\}])
.execute()
)
response = (
supabase.table("users")
.upsert(
\{"id": 42, "handle": "saoirse", "display_name": "Saoirse"\},
on_conflict="handle",
)
.execute()
)