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.
()
| 402 | // true. It returns ErrIteratorDone if the iterator is done. |
| 403 | // Otherwise, the current operation, key, val are returned. |
| 404 | func (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 | |
| 415 | func (iter *iterator) Len() int { |
| 416 | return len(iter.cursors) |
no outgoing calls
no test coverage detected