A js-style LevelDB binding for node.
The datatype is plain strings, support for buffers and other formats may be added.
var db = '/tmp/mydb';dbdbdbdb
$ npm install leveled
Instantiates a new DB at
path if necessary.
Get the value stored at
Delete the value stored at
Find all entries whose keys are in the give range.
At the moment glob-style matching is not fully implemented, what works is
In the future it will work like redis's
Creates a new
batch that queues up operations until its
write method is invoked.
Apply the batch's operations to the DB.
On my mb pro:
$ node bench/bench.jsbenchmarking with 120,000 records, 24 chars eachput : 128,479 w/s in 934msputSync : 372,670 w/s in 322msbatch : 612,244 w/s in 196msbatchSync : 641,711 w/s in 187msget : 58,881 r/s in 2,038msgetSync : 560,747 r/s in 214msiterator : 220,588 r/s in 544ms
put oparations don't force a sync to disk, hence the
get looking so slow. Iterators are faster for common tasks where you need to get many values anyways.