Progres
connect
returns a promise of a completed job. It takes the connection string, and a "job" callback.
The job callback takes an argument with a ProgresClient object. It has this method:
query
takes an SQL sting and optional parameters, returning a promise of the result.
The job callback must return a promise. It may not use the ProgresClient object outside the promise chain, since the database connection is released automatically when the job's returned promise resolves.
Basic example:
progres;
An example Express route:
var connectionString = 'postgres://user:password@localhost/database'; var posts = sql moduleexports { progres ;}