Documentation ¶
Index ¶
- func VerifyBatchRepr(repr []byte, start, end engine.MVCCKey, nowNanos int64) (enginepb.MVCCStats, error)
- type MVCCIncrementalIterator
- func (i *MVCCIncrementalIterator) Close()
- func (i *MVCCIncrementalIterator) Error() error
- func (i *MVCCIncrementalIterator) Key() engine.MVCCKey
- func (i *MVCCIncrementalIterator) Next()
- func (i *MVCCIncrementalIterator) Reset(startKey, endKey roachpb.Key, startTime, endTime hlc.Timestamp)
- func (i *MVCCIncrementalIterator) Valid() bool
- func (i *MVCCIncrementalIterator) Value() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MVCCIncrementalIterator ¶
type MVCCIncrementalIterator struct {
// contains filtered or unexported fields
}
MVCCIncrementalIterator iterates over the diff of the key range [startKey,endKey) and time range [startTime,endTime). If a key was added or modified between startTime and endTime, the iterator will position at the most recent version (before endTime) of that key. If the key was most recently deleted, this is signalled with an empty value.
Expected usage:
iter := NewMVCCIncrementalIterator(e) defer iter.Close() for iter.Reset(startKey, endKey, ...); iter.Valid(); iter.Next() { [code using iter.Key() and iter.Value()] } if err := iter.Error(); err != nil { ... }
func NewMVCCIncrementalIterator ¶
func NewMVCCIncrementalIterator(e engine.Reader) *MVCCIncrementalIterator
NewMVCCIncrementalIterator creates an MVCCIncrementalIterator with the specified engine.
func (*MVCCIncrementalIterator) Close ¶
func (i *MVCCIncrementalIterator) Close()
Close frees up resources held by the iterator.
func (*MVCCIncrementalIterator) Error ¶
func (i *MVCCIncrementalIterator) Error() error
Error returns the error, if any, which the iterator encountered.
func (*MVCCIncrementalIterator) Key ¶
func (i *MVCCIncrementalIterator) Key() engine.MVCCKey
Key returns the current key.
func (*MVCCIncrementalIterator) Next ¶
func (i *MVCCIncrementalIterator) Next()
Next advances the iterator to the next key/value in the iteration.
func (*MVCCIncrementalIterator) Reset ¶
func (i *MVCCIncrementalIterator) Reset( startKey, endKey roachpb.Key, startTime, endTime hlc.Timestamp, )
Reset begins a new iteration with the specified key and time ranges.
func (*MVCCIncrementalIterator) Valid ¶
func (i *MVCCIncrementalIterator) Valid() bool
Valid returns true if the iterator is currently valid. An iterator that hasn't had Reset called on it or has gone past the end of the key range is invalid.
func (*MVCCIncrementalIterator) Value ¶
func (i *MVCCIncrementalIterator) Value() []byte
Value returns the current value as a byte slice.