MCPcopy Create free account
hub / github.com/couchbase/moss / StartIterator

Method StartIterator

iterator.go:70–80  ·  view source on GitHub ↗

StartIterator returns a new iterator on the given segmentStack. On success, the returned Iterator will be positioned so that Iterator.Current() will either provide the first entry in the iteration range or ErrIteratorDone. A startKeyInclusive of nil means the logical "bottom-most" possible key and

(
	startKeyInclusive, endKeyExclusive []byte,
	iteratorOptions IteratorOptions)

Source from the content-addressed store, hash-verified

68// IteratorOptions.MinSegmentLevel parameter. For example, to ignore
69// the lowest, 0th segment, use MinSegmentLevel of 1.
70func (ss *segmentStack) StartIterator(
71 startKeyInclusive, endKeyExclusive []byte,
72 iteratorOptions IteratorOptions) (Iterator, error) {
73 iter, err :=
74 ss.startIterator(startKeyInclusive, endKeyExclusive, iteratorOptions)
75 if err != nil {
76 return nil, err
77 }
78
79 return iter.optimize()
80}
81
82// startIterator() returns a new iterator on the given segmentStack.
83//

Callers

nothing calls this directly

Calls 2

startIteratorMethod · 0.95
optimizeMethod · 0.80

Tested by

no test coverage detected