match()
Match only rows where each column in query
keys is equal to its
associated value. Shorthand for multiple .eq()
s.
1const { data, error } = await supabase
2 .from('countries')
3 .select('name')
4 .match({ id: 2, name: 'Albania' })
Parameters#
queryrequired
Record
The object to filter with, with column names as keys mapped to their filter values
Examples#
With select()
#
1create table
2 countries (id int8 primary key, name text);
3
4insert into
5 countries (id, name)
6values
7 (1, 'Afghanistan'),
8 (2, 'Albania'),
9 (3, 'Algeria');