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

Method CurrentEx

iterator.go:404–413  ·  view source on GitHub ↗

CurrentEx is a more advanced form of Current() that returns more metadata. It is used when IteratorOptions.IncludeDeletions is true. It returns ErrIteratorDone if the iterator is done. Otherwise, the current operation, key, val are returned.

()

Source from the content-addressed store, hash-verified

402// true. It returns ErrIteratorDone if the iterator is done.
403// Otherwise, the current operation, key, val are returned.
404func (iter *iterator) CurrentEx() (
405 entryEx EntryEx, key, val []byte, err error) {
406 if len(iter.cursors) <= 0 {
407 return EntryEx{}, nil, nil, ErrIteratorDone
408 }
409
410 cursor := iter.cursors[0]
411
412 return EntryEx{Operation: cursor.op}, cursor.k, cursor.v, nil
413}
414
415func (iter *iterator) Len() int {
416 return len(iter.cursors)

Callers 2

startIteratorMethod · 0.95
CurrentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected