SQLpage
SQLpage copied to clipboard
feat: add csv_attachment component
Hi 👋,
This commit follows the discussion in #260 (better late than never!). It implements the csv_attachment
component to return data as a CSV file.
SELECT
'csv_attachment' AS component,
';' AS separator,
'todo.csv' AS filename;
SELECT * FROM todos;
It works, but it feels a bit hacky due to the use of is_embedded
and Handlebars. Please feel free to make any changes, rename the component, or point me in the right direction.
If you like this implementation, I can add the component to the documentation.