Skip to content

Add the condition api the batch #9

@mafintosh

Description

@mafintosh

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(...)
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions