hypertrie icon indicating copy to clipboard operation
hypertrie copied to clipboard

Add the condition api the batch

Open mafintosh opened this issue 6 years ago • 0 comments

Support

db.batch([{
  condition: (newNode, oldNode, cb) => ...,
  type: 'put',
  key
  value
}])

The condition function should be able to query the db prebatch and during batch like so (maybe):

condition (newNode, oldNode, cb) {
  // db.transaction is a db instance that can query the transaction + old db
  db.transaction.get(...)
})

mafintosh avatar Feb 05 '19 10:02 mafintosh