Documentation ¶
Index ¶
- Variables
- func NewIterator(txn *badger.Txn, reverse bool, startKey, endKey []byte) *badger.Iterator
- type BatchGetFunc
- type DBReader
- func (r *DBReader) BatchGet(keys [][]byte, startTS uint64, f BatchGetFunc)
- func (r *DBReader) Close()
- func (r *DBReader) Get(key []byte, startTS uint64) ([]byte, error)
- func (r *DBReader) GetExtraIter() *badger.Iterator
- func (r *DBReader) GetIter() *badger.Iterator
- func (r *DBReader) GetKeyByStartTs(startKey, endKey []byte, startTs uint64) ([]byte, error)
- func (r *DBReader) GetMvccInfoByKey(key []byte, isRowKey bool, mvccInfo *kvrpcpb.MvccInfo) error
- func (r *DBReader) GetTxn() *badger.Txn
- func (r *DBReader) ReverseScan(startKey, endKey []byte, limit int, startTS uint64, proc ScanProcessor) error
- func (r *DBReader) Scan(startKey, endKey []byte, limit int, startTS uint64, proc ScanProcessor) error
- type ScanFunc
- type ScanProcessor
Constants ¶
This section is empty.
Variables ¶
View Source
var ScanBreak = errors.New("scan break")
ScanBreak is returnd by ScanFunc to break the scan loop.
Functions ¶
Types ¶
type BatchGetFunc ¶
type DBReader ¶
DBReader reads data from DB, for read-only requests, the locks must already be checked before DBReader is created.
func (*DBReader) BatchGet ¶
func (r *DBReader) BatchGet(keys [][]byte, startTS uint64, f BatchGetFunc)
func (*DBReader) GetExtraIter ¶
func (*DBReader) GetKeyByStartTs ¶
func (*DBReader) GetMvccInfoByKey ¶
GetMvccInfoByKey fills MvccInfo reading committed keys from db
func (*DBReader) ReverseScan ¶
func (r *DBReader) ReverseScan(startKey, endKey []byte, limit int, startTS uint64, proc ScanProcessor) error
ReverseScan implements the MVCCStore interface. The search range is [startKey, endKey).
type ScanFunc ¶
ScanFunc accepts key and value, should not keep reference to them. Returns ScanBreak will break the scan loop.
type ScanProcessor ¶
type ScanProcessor interface { // Process accepts key and value, should not keep reference to them. // Returns ScanBreak will break the scan loop. Process(key, value []byte) error // SkipValue returns if we can skip the value. SkipValue() bool }
ScanProcessor process the key/value pair.
Click to show internal directories.
Click to hide internal directories.