pg-core
v0.1.15
Published
PostgreSQL Core Driver for NodeJS
Downloads
677
Maintainers
Readme
pg-core
PostgreSQL Core Driver for NodeJS.
Initially based on node-postgres and its core packages, this core library for PostgreSQL is independent of the original work. Its goal is improved and simplified support with timely updates and bug fixes.
Installing
$ npm install pg-core
Using
var pg = require('pg-core');
The library exposes the same object as the original pg
, with the addition of:
pg.stream
- instance of the embedded pg-query-stream library;pg.cursor
- instance of the embedded pg-cursor library;
and with the exception of:
pg.native
- nativelibpq
bindings have been fully removed.
Apart from these differences, the original node-postgres is a reliable source of documentation that entirely covers functionality of this library as well.
Testing
For details on running tests on your local machine see testing pg-core.
Origins
The original snapshots were taken on November 11, 2015, and included:
- node-postgres v.4.4.3
- pg-query-stream v.0.7.0, exposed as
pg.stream
- pg-copy-streams v.0.3.0, exposed as
pg.copy
- pg-cursor v.1.0.0, exposed as
pg.cursor
- pg-types v.1.10.0, exposed as
pg.types
All code changes later committed for original packages are merged into this library. For details see the merge history.
What's Changed
The following has been changed from the original node-postgres library:
- Completely removed -
pg.native
, only javascript implementation is supported; - The library has being refactored for ES6 compliance
- All dependencies are kept up-to-date, no use of obsolete packages;
- Supported environments: NodeJS 0.10 - 5.x, PostgreSQL 9.x, Win/Linux/OS-X
- New tests are being written in place of the old ones. YOUR HELP IS WELCOME!
License
The original license note can be found here.