sql2csv 0.3.1

Export SQL query to csv file
Documentation

Install

cargo install sql2csv

Usage

Query with inline SQL

sql2csv \
    --db "postgres://postgres@localhost/test" \
    --out "export.csv" \
    inline \
    --sql "SELECT id, name FROM users" \
    --header "id, name" 

Query with SQL from TOML file

sql2csv \
    --db "postgres://postgres@localhost/test" \
    --out "export.csv" \
    file \
    --file test.toml