mafintosh / hyperdb

Distributed scalable database
MIT License
752 stars 75 forks source link

Add key history iterator #138

Closed e-e-e closed 5 years ago

e-e-e commented 6 years ago

This is a simple PR to add the ability to stream the history of a specific prefix.

I want to be able to quickly iterate all values that a key has ever been.

I have write basic tests and it appears to be working, but I wanted to get your thoughts on this @mafintosh, to see if I am approaching the problem in the best way - or if there is a smarter way of traversing backwards.

mafintosh commented 5 years ago

This looks good to me, but I wonder if this would be better as a new api instead of being in the history one, as it's kinda different behaivor right?

e-e-e commented 5 years ago

Hey @mafintosh - I dont think @pfrazee had any particular naming suggestions. Is it possible to get this merged? I would love to implement versioning in hyper-readings but require this functionality to do so.

mafintosh commented 5 years ago

Great job! Especially with the tests

mafintosh commented 5 years ago

3.3.0 :tada:

pfrazee commented 5 years ago

Thanks @e-e-e !