csv()

Return data as a string in CSV format.

1const { data, error } = await supabase
2  .from('countries')
3  .select()
4  .csv()

Examples#

Return data as CSV#

By default, the data is returned in JSON format, but can also be returned as Comma Separated Values.

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');