You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
664 B

const util = require('util')
, AbstractChainedBatch = require('abstract-leveldown').AbstractChainedBatch
function ChainedBatch (db) {
AbstractChainedBatch.call(this, db)
this.binding = db.binding.batch()
}
ChainedBatch.prototype._put = function (key, value) {
this.binding.put(key, value)
}
ChainedBatch.prototype._del = function (key) {
this.binding.del(key)
}
ChainedBatch.prototype._clear = function (key) {
this.binding.clear(key)
}
ChainedBatch.prototype._write = function (options, callback) {
this.binding.write(options, callback)
}
util.inherits(ChainedBatch, AbstractChainedBatch)
module.exports = ChainedBatch