add batch.clear to bst.
This commit is contained in:
parent
32e94429d3
commit
d329d6e92f
@ -493,6 +493,12 @@ Batch.prototype.write = function write(callback) {
|
||||
return this;
|
||||
};
|
||||
|
||||
Batch.prototype.clear = function clear(callback) {
|
||||
assert(this.tree, 'Already written.');
|
||||
this.ops.length = 0;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Iterator
|
||||
*/
|
||||
@ -560,7 +566,7 @@ Iterator.prototype.next = function(callback) {
|
||||
if (this.options.valueAsBuffer === false)
|
||||
value = value.toString('utf8');
|
||||
|
||||
return utils.asyncify(callback)(null, key, value);
|
||||
utils.asyncify(callback)(null, key, value);
|
||||
};
|
||||
|
||||
Iterator.prototype.seek = function seek(key) {
|
||||
|
||||
@ -40,7 +40,6 @@
|
||||
"browserify": "13.0.0",
|
||||
"hash.js": "1.0.3",
|
||||
"level-js": "2.2.3",
|
||||
"memdown": "1.1.2",
|
||||
"mocha": "1.21.5",
|
||||
"uglify-js": "2.6.1",
|
||||
"v8-profiler": "5.6.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user