single()
从结果中只检索一条记录. 结果必须是一行(例如,使用limit),否则会导致错误.
const { data, error } = await supabase
.from('cities')
.select('name, country_id')
.single()
例子
使用select()
const { data, error } = await supabase
.from('cities')
.select('name, country_id')
.single()