npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

pgdown

0.0.0

@ralphtheninja

npmHomeRepoSnykSocket
Downloads:0
$ npm install pgdown
DailyWeeklyMonthlyYearly

pgdown Build Status

Experimental and WIP. Do not use.

PostgreSQL backed abstract-leveldown.

Usage

Use together with levelup to get a PostgreSQL backed storage.

const levelup = require('levelup')
const pgdown = require('pgdown')

const uri = 'postgres://postgres:@localhost:5432/postgres'
const db = levelup(uri, {
  db: pgdown,
  keyEncoding: 'utf8',
  valueEncoding: 'json'
})

db.put('foo', { bar: 'baz' }, (err) => {
  db.get('foo', (err, result) => {
    console.log('result %j', result)
  })
})

License

MIT