in_()
in_()用于查找所有在指定列(column)
上数值存在于指定值列表(arry)
中的记录
is_
和in_
过滤方法的后缀是_
,以避免与保留的关键字发生冲突。
案例教程
案例1 (使用select)#
1final data = await supabase 2 .from('cities') 3 .select('name, country_id') 4 .in_('name', ['Rio de Janeiro', 'San Francisco']);
案例2 (使用update)#
1final data = await supabase 2 .from('cities') 3 .update({ 'name': 'Mordor' }) 4 .in_('name', ['Rio de Janeiro', 'San Francisco']);
案例3 (使用delete)#
1final data = await supabase 2 .from('cities') 3 .delete() 4 .in_('name', ['Rio de Janeiro', 'San Francisco']);
案例4 (使用rpc)#
1// Only valid if the Stored Procedure returns a table type. 2final data = await supabase 3 .rpc('echo_all_cities') 4 .in_('name', ['Rio de Janeiro', 'San Francisco']);