values dict to use upsert..select() after upsert() to return specific columns from the upserted row(s).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("instruments")
.upsert({"id": 1, "name": "piano"})
.execute()
)
response = (
supabase.table("instruments")
.upsert([{"id": 1, "name": "piano"}, {"id": 2, "name": "guitar"}])
.execute()
)
response = (
supabase.table("users")
.upsert(
{"id": 42, "handle": "saoirse", "display_name": "Saoirse"},
on_conflict="handle",
)
.execute()
)
response = (
supabase.table("instruments")
.upsert({"id": 1, "name": "piano"})
.select("id, name")
.execute()
)