Generator style node interface to LevelDB.
var le = require('le');
var co = require('co');
var db = le('db');
co(function*(){
yield db.set('foo', 'bar');
console.log('foo: %s', yield db.get('foo'));
})();
$ npm install le
Create or open the db at path.
Get the value at key.
Set the value at key to value.
Delete the value at key.
Create a batch.
Queue setting key to value.
Queue deleting the value at key.
Write the batch of operations.
Get all keys (inside range).
Get all values (whose keys are inside range).
db#keys() and db#values() accept string ranges of those formats:
""/"*": get all"prefix*": all keys must start with prefix"[from,to]", "[from,to)", "(from,to]", "(from,to)": all keys must be
inside the interval, see
interval notations.
For infinity to x and vice versa omit the boundary, like [,to].For now, everything is stored as JSON.
MIT