@keyvhq/postgres
TypeScript icon, indicating that this package has built-in type declarations

2.1.7 • Public • Published

@keyvhq/postgres keyv

PostgreSQL storage adapter for Keyv.

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

Install

npm install --save @keyvhq/core @keyvhq/postgres

Usage

const KeyvPostgres = require('@keyvhq/postgres')
const Keyv = require('@keyvhq/core')

const keyv = new Keyv({
  store: new KeyvPostgres({
    uri: 'postgresql://user:pass@localhost:5432/dbname',
    ssl: {
      rejectUnauthorized: false
    }
  })
})

You can specify the table option:

const KeyvPostgres = require('@keyvhq/postgres')
const Keyv = require('@keyvhq/core')

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

License

@keyvhq/postgres © Luke Childs, released under the MIT License.
Maintained by Microlink with help from contributors.

microlink.io · GitHub microlinkhq · X @microlinkhq

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.71latest

Version History

VersionDownloads (Last 7 Days)Published
2.1.71
2.1.653
2.1.51
2.1.11
2.1.01
2.0.22
2.0.01
2.0.0-beta.01
1.6.281
1.6.261
1.6.231
1.6.151
1.6.131
1.6.71
1.6.61
1.6.51
1.6.31
1.6.21
1.6.01
1.5.11
1.4.01
1.3.00
1.2.71
1.2.01
1.1.11
1.1.01
1.0.21
1.0.11
0.0.5-alpha.01

Package Sidebar

Install

npm i @keyvhq/postgres

Homepage

keyv.js.org

Weekly Downloads

81

Version

2.1.7

License

MIT

Unpacked Size

5.42 kB

Total Files

5

Last publish

Collaborators

  • kikobeats
  • jytesh