MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / NewIterator

Method NewIterator

engine/iterator.go:17–24  ·  view source on GitHub ↗

NewIterator Initializes the iterator

(opt config.IteratorOptions)

Source from the content-addressed store, hash-verified

15
16// NewIterator Initializes the iterator
17func (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
26func (it *Iterator) Rewind() {
27 it.indexIter.Rewind()

Callers 5

TestDB_NewIteratorFunction · 0.95
FirstIndexMethod · 0.80
LastIndexMethod · 0.80

Calls 1

IteratorMethod · 0.65

Tested by 3

TestDB_NewIteratorFunction · 0.76