single()

Retrieves only one row from the result. Result must be one row (e.g. using limit), otherwise this will result in an error.

1final data = await supabase
2  .from('cities')
3  .select('name, country_id')
4  .single();

Examples#

With select()#

1final data = await supabase
2  .from('cities')
3  .select('name, country_id')
4  .single();