insert
or update
, you have to provide a serializable value in the function parameter.The value(s) you want to insert. `T` can be any serializable type.
Comma-separated UNIQUE column(s) to specify how duplicate rows are determined. Two rows are duplicates if all the `onConflict` columns are equal.
Make missing fields default to `null`. Otherwise, use the default value for the column. This only applies when inserting new rows, not when merging with existing rows under
If `true`, duplicate rows are ignored. If `false`, duplicate rows are merged with existing rows.
Additional configuration & filtering for the request.
val toUpsert = Message(id = 3, message = "foo", username = "supabot")
supabase.from("messages").upsert(toUpsert)
val toUpsert = User(username = "supabot")
supabase.from("users").upsert(toUpsert, onConflict = "username")
val toUpsert = User(username = "supabot")
val count = supabase.from("users").upsert(toUpsert, onConflict = "username") \{
count(Count.EXACT)
\}.count()