0.0.0 • Published 9 years ago
pgdown v0.0.0
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
0.0.0
9 years ago