A Waterline adapter for PostgreSQL, with PostGIS support.
- 100% re-write of the original sails-postgresql adapter in ES6. And way faster.
- Uses knex.js for query building and connection pooling
- PostGIS 2.1+ Support
- Waterline v0.11 and later
- PostgreSQL 9.4 and later
$ npm install waterline-postgresql --save
module.exports.connections = {
// ...
postgresdb: {
/**
* This 'connection' object could also be a connection string
* e.g. 'postgresql://user:password@localhost:5432/databaseName?ssl=false'
*/
connection: {
database: 'databaseName',
host: 'localhost',
user: 'user',
password: 'password',
port: 5432,
ssl: false
},
/**
* Pool configuration
*/
pool: {
min: 2,
max: 20
}
}
}
MIT