NewIterator returns an iterator of the DB. The returned iterator is not goroutine-safe, but it is safe to use multiple iterators concurrently, with each in a dedicated goroutine. It is also safe to use an iterator concurrently with modifying its underlying DB. However, the resultant key/value pairs are not guaranteed to be a consistent snapshot of the DB at a particular point in time.

Slice allows slicing the iterator to only contains keys in the given range. A nil Range.Start is treated as a key before all keys in the DB. And a nil Range.Limit is treated as a key after all keys in the DB.

The iterator must be released after use, by calling Release method.

Also read Iterator documentation of the leveldb/iterator package.

NewIterator is referenced in 0 repositories