Having a batch API that is something like
table.batchWrite([
{ hash: 'foo', range: 'bar', value: { ... } },
{ hash: 'foo': range: 'other', delete: true }
])
Is less likely to delete due to a bug, since the delete is opt in.
we can also add something like
const batch = table.startBatchWrite()
batch.put('foo', 'bar', { ... })
batch.delete('foo', 'other')
const { err } = await batch.commit()
In the future, to support an API with fewer allocations. ( Would be nice to have benchmarks first before doing this ).