level-pathwise
Turn a leveldb into one huge object of arbitrary size! Efficiently and atomically update and read parts of it!

Example
var Pathwise = require('level-pathwise');
var level = require('level');
var store = new Pathwise(level('db'));
store.put([], {
foo: {
bar: ['beep', 'boop'],
baz: 'bleep'
}
}, function(err){});
store.get([], function(err, obj){
});
store.get(['foo', 'bar'], function(err, obj){
});
store.put([], {
foo: {
key: 'value'
}
})
store.children(['foo'], function(err, children){
});
store.del(['foo', 'baz'], function(err){});
store.batch([
{ type: 'put', path: [], data: { i: said: { what: 'what' } } },
{ type: 'del', path: ['foo'] }
], function(){});
Installation
$ npm install level-pathwise
API
Pathwise(db)
Instantiate a new pathwise store, using db.
#put(path, object[, opts], fn)
Store object at path.
Options:
batch: LevelUP batch object to use
#get(path, fn)
Get the object at path with all its children.
#del(path[, opts], fn)
Delete the object at path with all its children.
Options:
batch: LevelUP batch object to use
#children(path, fn)
Get the direct children of path.
#batch(ops, fn)
Execute multiple get and del operations in one atomic batch. ops is an array with objects of type
{ type: 'put', path: path, data: data }
{ type: 'del', path: path }
License
MIT