@keyv/postgres

PostgreSQL storage adapter for Keyv

Stats

StarsIssuesVersionUpdatedCreatedSize
@keyv/postgres
421.0.1714 days ago4 years agoMinified + gzip package size for @keyv/postgres in KB

Readme

@keyv/postgres keyv

PostgreSQL storage adapter for Keyv

build Coverage Status npm

PostgreSQL storage adapter for Keyv.

Requires Postgres 9.5 or newer for ON CONFLICT support to allow performant upserts. Why?

Install

npm install --save keyv @keyv/postgres

Usage

const Keyv = require('keyv');

const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname');
keyv.on('error', handleConnectionError);

You can specify the table option.

e.g:

const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname', { table: 'cache' });

License

MIT © Luke Childs

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.