plimsoll
v0.1.10
Published
PostgreSQL adapter for Sails.js, drop-in replacement for Waterline
Downloads
13
Maintainers
Readme
Plimsoll
Lightweight ORM for using PostgreSQL with Sails.js.
This is an experimental drop-in replacement for all of the following Sails.js/sails
extensions:
This module has a peer dependency on pg
(node-postgres
).
Aims
- define minimal dependencies, and keep these up-to-date
- allow keeping
pg
/node-postgres
up-to-date in parent projects directly by defining it as a peer dependency - simplicity
- work on currently-supported PostgreSQL versions
- don't support sails's "migrations", i.e. automatic schema generation
Installation
Latest master
With Yarn
yarn remove sails-hook-orm sails-postgresql &&
yarn add pg https://github.com/alxndrsn/plimsoll.git#master
With npm
npm uninstall sails-hook-orm sails-postgresql &&
npm install --save pg https://github.com/alxndrsn/plimsoll.git#master
Latest Relase
With Yarn
yarn remove sails-hook-orm sails-postgresql &&
yarn add pg plimsoll
With npm
npm uninstall sails-hook-orm sails-postgresql &&
npm install --save pg plimsoll
Development
Running tests
With Docker
yarn test:docker
Without Docker
This requires:
- a locally-accessible PostgreSQL server, with a user account
- environment variables defined for connecting to the DB
e.g.
POSTGRES_URL=postgresql://your_user:your_user_password@localhost:5432/plimsoll_test \
yarn test
or
POSTGRES_HOST=localhost \
POSTGRES_USER=your_user \
POSTGRES_PASSWORD=your_user_password \
POSTGRES_DATABASE=plimsoll_test \
yarn test
Contributing
Any bug reports, suggestions, or general comments are welcome in the Issues.
If you find a bug or gap in functionality, please report it.
It's especially helpful if you can provide a failing test case, or:
- model definition(s)
- db schema
- interaction performed
- observed result
- expected result