Is there a way, with SQLite3 for Node, to perform a query and either return it as a CSV file that I can then save locally, or have it save locally, automatically.
db.all("SELECT * FROM example WHERE foo = 'bar'", function (error, data) {
// returns a JSON, I want a CSV file
});
Perhaps, something that can leverage or execute the commands presented in: How do I save the result of a query as a CSV file?
Here's an example of what a solution might look like:
db.save("SELECT * FROM example WHERE foo = 'bar'", directory, filename, cb)