Perform an INSERT into the table or view.
insert
method, you have to provide a serializable value.insert
will not return the inserted data. If you want to return the inserted data, you can use the select()
method inside the request.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))