JavaScript: Return data after inserting

Perform a SELECT on the query result.

By default, .insert(), .update(), .upsert(), and .delete() do not return modified rows. By calling this method, modified rows are returned in data.

Parameters

Examples

With `upsert()`

const { data, error } = await supabase .from('characters') .upsert({ id: 1, name: 'Han Solo' }) .select()