MatrixAI / js-db

Key-Value DB for TypeScript and JavaScript Applications
https://polykey.com
Apache License 2.0
5 stars 0 forks source link

Expose `Transaction::GetWriteBatch` to get batch information about the transaction #36

Open CMCDragonkai opened 2 years ago

CMCDragonkai commented 2 years ago

Specification

The usage of Transaction::GetWriteBatch returns a map structure called WriteBatchWithIndex which can be used to interrogate what is inside a transaction.

The map structure can show us what is about to be committed in to the transaction. This can be useful for debugging.

To integrate this, we should start using shared pointers in C++ to make our GC a little easier. I'm not sure how that would work with the napi_ref reference counting.

Additional context

Tasks

  1. ...
  2. ...
  3. ...