MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / downloadCsv

Function downloadCsv

console/src/platform/shell/SqlSelectTable.tsx:156–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154 const tableId = useId();
155
156 const downloadCsv = () => {
157 const formattedRows = formatRows(cols ?? [], rows ?? []);
158 const csv = Papa.unparse([colNames, ...(formattedRows ?? [])]);
159 downloadFile("materialize_shell_export.csv", csv, { mimeType: "text/csv" });
160 toast({ description: "Results saved to CSV" });
161 };
162
163 const copyMarkdown = () => {
164 const formattedRows = formatRows(cols ?? [], rows ?? []);

Callers

nothing calls this directly

Calls 2

downloadFileFunction · 0.90
formatRowsFunction · 0.85

Tested by

no test coverage detected