Skip to content
PostgreSQL adapter for Sails.js
Branch: master
Clone or download
Pull request Compare This branch is 420 commits behind balderdashy:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


PostgreSQL Sails/Waterline Adapter

Build Status NPM version Dependency Status

A Waterline adapter for PostgreSQL. May be used in a Sails app or anything using Waterline for the ORM.


Install is through NPM.

$ npm install sails-postgresql


The following config options are available along with their default values:

config: {
  database: 'databaseName',
  host: 'localhost',
  user: 'root',
  password: '',
  port: 5432,
  pool: false,
  ssl: false

Alternatively, you can supply the connection information in URL format:

config: {
  url: 'postgres://username:password@hostname:port/database',
  pool: false,
  ssl: false

We are also testing features for future versions of waterline in postgresql. One of these is case sensitive string searching. In order to enable this feature today you can add the following config flag:

postgresql: {
  url: 'postgres://username:password@hostname:port/database',
  wlNext: {
    caseSensitive: true


Test are written with mocha. Integration tests are handled by the waterline-adapter-tests project, which tests adapter methods against the latest Waterline API.

To run tests:

$ npm test

About Waterline

Waterline is a new kind of storage and retrieval engine. It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get users, whether they live in mySQL, LDAP, MongoDB, or Facebook.

To learn more visit the project on GitHub at Waterline.

You can’t perform that action at this time.