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

Method Next

iterator_single.go:54–72  ·  view source on GitHub ↗

Next returns ErrIteratorDone if the iterator is done.

()

Source from the content-addressed store, hash-verified

52
53// Next returns ErrIteratorDone if the iterator is done.
54func (iter *iteratorSingle) Next() error {
55 err := iter.sc.Next()
56 if err != nil {
57 iter.op = 0
58 iter.k = nil
59 iter.v = nil
60
61 // we DO want to return ErrIteratorDone here
62 return err
63 }
64
65 iter.op, iter.k, iter.v = iter.sc.Current()
66 if iter.op != OperationDel ||
67 iter.iteratorOptions.IncludeDeletions {
68 return nil
69 }
70
71 return iter.Next()
72}
73
74func (iter *iteratorSingle) SeekTo(seekToKey []byte) error {
75 key, _, err := iter.Current()

Callers 1

SeekToMethod · 0.95

Calls 2

NextMethod · 0.65
CurrentMethod · 0.65

Tested by

no test coverage detected