func (txn *hbaseTxn) Seek(k kv.Key) (kv.Iterator, error) { log.Debugf("seek %q txn:%d", k, txn.tid) k = kv.EncodeKey(k) iter, err := txn.UnionStore.Seek(k, txn) if err != nil { return nil, errors.Trace(err) } return kv.NewDecodeKeyIter(iter), nil }
func (txn *dbTxn) Seek(k kv.Key) (kv.Iterator, error) { log.Debugf("seek key:%q, txn:%d", k, txn.tid) k = kv.EncodeKey(k) iter, err := txn.UnionStore.Seek(k, txn) if err != nil { return nil, errors.Trace(err) } if !iter.Valid() { return &kv.UnionIter{}, nil } return kv.NewDecodeKeyIter(iter), nil }