mafintosh / hyperdb

Distributed scalable database
MIT License
753 stars 75 forks source link

Add reverse option to iterator #111

Closed andrewosh closed 6 years ago

andrewosh commented 6 years ago

By reversing the sort order in iterator, we can efficiently iterate over results in descending hash order. This option will be necessary for a leveldown implementation. Implements #107

This PR:

  1. Adds the reverse option to iterator
  2. Duplicates the tests in iterator-order.js to test for reverse iteration.
mafintosh commented 6 years ago

Great!