NewIterator Initializes the iterator
(opt config.IteratorOptions)
| 15 | |
| 16 | // NewIterator Initializes the iterator |
| 17 | func (db *DB) NewIterator(opt config.IteratorOptions) *Iterator { |
| 18 | indexIter := db.index.Iterator(opt.Reverse) |
| 19 | return &Iterator{ |
| 20 | indexIter: indexIter, |
| 21 | db: db, |
| 22 | options: opt, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | func (it *Iterator) Rewind() { |
| 27 | it.indexIter.Rewind() |