match()

match()用于查找表(table)中所有列与指定的查询(query)对象相匹配的行。

案例教程

案例1 (使用select)#

1                                                                              
2final data = await supabase
3  .from('cities')
4  .select('name, country_id')
5  .match({'name': 'Beijing', 'country_id': 156});

案例2 (使用update)#

1                                                                              
2final data = await supabase
3  .from('cities')
4  .update({ 'name': 'Mordor' })
5  .match({'name': 'Beijing', 'country_id': 156});

案例3 (使用delete)#

1                                                                              
2final data = await supabase
3  .from('cities')
4  .delete()
5  .match({'name': 'Beijing', 'country_id': 156});

案例4 (使用rpc)#

1                                                                              
2// Only valid if the Stored Procedure returns a table type.
3final data = await supabase
4  .rpc('echo_all_cities')
5  .match({'name': 'Beijing', 'country_id': 156});