// Decode skips the iterator as long as its key is currKey, the new key would be stored.
Decode skips the iterator as long as its key is currKey, the new key would be stored.
// Decode skips the iterator as long as its key is currKey the new key would be stored .
func (dec *skipDecoder) Decode(iter *gorocksdb.Iterator) (bool, error) {
	if iter.Err() != nil {
		return false, iter.Err()
	}
	for iter.Valid() {
		key, _, err := mvccDecode(iter.Key().Data())
		if err != nil {
			return false, errors.Trace(err)
		}
		if !bytes.Equal(key, dec.currKey) {
			dec.currKey = key
			return true, nil
		}
		iter.Next()
	}
	return false, nil
}
func ( dec * skipDecoder ) Decode ( iter * gorocksdb . Iterator ) ( bool , error ) { if iter . Err ( ) != nil { return false , iter . Err ( ) } for iter . Valid ( ) { key , _ , err := mvccDecode ( iter . Key ( ) . Data ( ) ) if err != nil { return false , errors . Trace ( err ) } if ! bytes . Equal ( key , dec . currKey ) { dec . currKey = key return true , nil } iter . Next ( ) } return false , nil }
Decode skips the iterator as long as its key is currKey, the new key would be stored.
Decode skips the iterator as long as its key is currKey the new key would be stored .