Bam
07/17/2024, 12:09 PMJan
07/17/2024, 4:26 PMDoes the Upsert automatically do a Select and return all new/updated rows? If not, how could that be achieved?Like all other operations (except select of course), you have to use
select()
within your request builder:
val res = supabase.from("table").upsert(data) {
select()
}
Does the comment ("_If you need to insert new data and update existing data at the same time, use Postgres triggers._") still hold true as the referenced ticket is closed and commented with "Once PostgREST/postgrest#1567 is cleared out then the library will allow this out-of-the-box."As of #611, this is possible.
Bam
07/18/2024, 8:07 AM