immudb icon indicating copy to clipboard operation
immudb copied to clipboard

Add revision support for transaction entries in client

Open grossvater opened this issue 2 years ago • 0 comments

What would you like to be added or enhanced When iterating over entries in a transaction, revision should be available for each entry, e.g:

txs, err := client.TxScan(ctx, &schema.TxScanRequest{
		InitialTx: next,
                ...
})

txl := txs.GetTxs()
for _, tx := range txl {
    for _, e := range tx.Entries {
        revision := e.GetRevision()  // missing
    }
}

Why is this needed Revision is an important piece of information when iterating transactions, and today for getting it, another call to History() is needed, then scanning the result looking for the transaction of interest in order to find the revision.

Additional context See also this discussion (in the context of an embedded store, but still, the same need).

grossvater avatar Jul 14 '22 13:07 grossvater