0.2.1 • Published 1 year ago

pgschema-helper v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

pgschema-helper

Parse the full schema file produced by pgdump --schema-only and break this file into individual components such as table, view, function, etc and save them into a designated output directory.

Install

npm i pgschema-helper

Usage

Library

const writer = new SchemaWritter('./output');
const lines = readLineByLine('./input/schema.sql');
for await (const line of lines) {
    writer.writeOutput(line);
}
writer.close();

CLI

Usage:
    pgschema-generator [options] <schema-file>

Read from STDIN:
    * pass '-' as <schema-file> 

Options:
    --output, -o    Output directory [default: ./output]
    --help          Show help
0.2.1

1 year ago

0.2.0

1 year ago