PG Type
Dynamically adds new types to the database and adds new values to existing enums
install
npm install -S pg-type
usage
// Tell pg-type how to query your dbconst pg = const query = { const client = 'postgres://localhost/mydb' client}
Then later on you end up modifying your apps types:
pgtype will modify your enums (never drops) and add new types.
API
Root Namespace
require('pg-type') -> Function
Pg Type creator factory
TypeCreator
.query(query: string, values: any[], callback: NodeCallback) -> Function|This
Gets or sets the query interface
.types([types]) -> String|This
Gets or mixes in types
.create(callback) -> This
Creates new types/enums and checks to see if enums need to be modified.
Will not remove enum values so you'll still need to use something like pg-delta for that.