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) UnsafeKey() engine.MVCCKey
- func (i *MVCCIncrementalIterator) UnsafeValue() []byte
- func (i *MVCCIncrementalIterator) Valid() bool
- func (i *MVCCIncrementalIterator) Value() []byte
- type MultiIterator
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) UnsafeKey ¶
func (i *MVCCIncrementalIterator) UnsafeKey() engine.MVCCKey
UnsafeKey returns the same key as Key, but the memory is invalidated on the next call to {Next,Reset,Close}.
func (*MVCCIncrementalIterator) UnsafeValue ¶
func (i *MVCCIncrementalIterator) UnsafeValue() []byte
UnsafeValue returns the same value as Value, but the memory is invalidated on the next call to {Next,Reset,Close}.
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.
type MultiIterator ¶
type MultiIterator struct {
// contains filtered or unexported fields
}
MultiIterator multiplexes iteration over a number of engine.Iterators.
func MakeMultiIterator ¶
func MakeMultiIterator(iters []engine.Iterator) *MultiIterator
MakeMultiIterator creates an iterator that multiplexes engine.Iterators.
func (*MultiIterator) Error ¶
func (f *MultiIterator) Error() error
Error returns the error, if any, which the iterator encountered.
func (*MultiIterator) Next ¶
func (f *MultiIterator) Next()
Next advances the iterator to the next key/value in the iteration. After this call, Valid() will be true if the iterator was not positioned at the last key.
func (*MultiIterator) NextKey ¶
func (f *MultiIterator) NextKey()
NextKey advances the iterator to the next MVCC key. This operation is distinct from Next which advances to the next version of the current key or the next key if the iterator is currently located at the last version for a key.
func (*MultiIterator) Seek ¶
func (f *MultiIterator) Seek(key engine.MVCCKey)
Seek advances the iterator to the first key in the engine which is >= the provided key.
func (*MultiIterator) UnsafeKey ¶
func (f *MultiIterator) UnsafeKey() engine.MVCCKey
UnsafeKey returns the current key, but the memory is invalidated on the next call to {NextKey,Seek}.
func (*MultiIterator) UnsafeValue ¶
func (f *MultiIterator) UnsafeValue() []byte
UnsafeValue returns the current value as a byte slice, but the memory is invalidated on the next call to {NextKey,Seek}.
func (*MultiIterator) Valid ¶
func (f *MultiIterator) Valid() bool
Valid returns true if the iterator is currently valid. An iterator that hasn't had Seek called on it or has gone past the end of the key range is invalid.