insert
method, you have to provide a serializable value.insert()
, the client library will make a select
to return the full record. This is convenient, but it can also cause problems if your policies are not configured to allow the select
operation.The value(s) you want to insert. `T` can be any serializable type.
Additional configuration & filtering for the request.
val city = City(name = "The Shire", countryId = 554)
supabase.from("cities").insert(city)
val city = City(name = "The Shire", countryId = 554)
val result = supabase.from("cities").insert(city) \{
select()
\}.decodeSingle<City>()
val theShire = City(name = "The Shire", countryId = 554)
val rohan = City(name = "Rohan", countryId = 554)
supabase.from("cities").insert(listOf(theShire, rohan))