Get a csv from a postgresql query result
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
pg_to_csv.gemspec

README.md

PgToCsv

Turn a postgres query result into a csv, so you can send it to people who like csvs.

Installation

Add this line to your application's Gemfile:

gem 'pg_to_csv'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pg_to_csv

Usage

After you get a postgres query result, just call the following command with the csv name to get a csv.

PgToCsv.to_csv(result, name)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request