pg-json-data-export
Export a Postgres database as JSON
Install
$ npm install pg-json-data-export --save
Usage
var exporter = ;var connection = // pg connections object;exporter ;
API
.toJSON (connection, schema)
@param | description |
---|---|
connection |
connection string or object compatible with pg |
schema |
the database schema to export |
@return | description |
Object |
dump of all tables in database schema{ table1: { rows: [ { /* ... */ } ] } } |
License
MIT