take postgres schema dump (--schema-only) and read it into a js object with keys and field types
can be used cli or a module.
pg_dump --schema-only databasename | pgschematojson
sudo npm install -g pgschematojson
- schema, takes an optional schema string to parse
- cb, the callback with the resultant data object.
- return value, if schema is not provided this returns a writeable stream which expects a piped stream of schema data
runs pg_dump with provided config
- config, {password:,user:,host:,database:}
- returns a stream of schema data