pgdown
v0.0.0
Published
PostgreSQL backed abstract-leveldown
Downloads
2
Keywords
Readme
pgdown
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