对表或视图执行UPDATE操作。
update()
应始终与过滤器结合使用,以定位您希望更新的项目。用于更新的数值
命名参数
const { error } = await supabase
.from('instruments')
.update({ name: '钢琴' })
.eq('id', 1)
const { data, error } = await supabase
.from('instruments')
.update({ name: '钢琴' })
.eq('id', 1)
.select()
const { data, error } = await supabase
.from('users')
.update({
address: {
street: '梅尔罗斯广场',
postcode: 90210
}
})
.eq('address->postcode', 90210)
.select()