MCPcopy
hub / github.com/pingcap/tidb / EncodeRowKey

Function EncodeRowKey

pkg/tablecodec/tablecodec.go:106–111  ·  view source on GitHub ↗

EncodeRowKey encodes the table id and record handle into a kv.Key

(tableID int64, encodedHandle []byte)

Source from the content-addressed store, hash-verified

104
105// EncodeRowKey encodes the table id and record handle into a kv.Key
106func EncodeRowKey(tableID int64, encodedHandle []byte) kv.Key {
107 buf := make([]byte, 0, prefixLen+len(encodedHandle))
108 buf = appendTableRecordPrefix(buf, tableID)
109 buf = append(buf, encodedHandle...)
110 return buf
111}
112
113// EncodeRowKeyWithHandle encodes the table id, row handle into a kv.Key
114func EncodeRowKeyWithHandle(tableID int64, handle kv.Handle) kv.Key {

Callers 15

buildMethod · 0.92
TestLoadBackupMetaFunction · 0.92
buildTableAndFilesFunction · 0.92
TestGetNextIntHandleFunction · 0.92
fetchTableScansMethod · 0.92
RemoveRecordMethod · 0.92

Calls 1

appendTableRecordPrefixFunction · 0.85

Tested by 15

buildMethod · 0.74
TestLoadBackupMetaFunction · 0.74
buildTableAndFilesFunction · 0.74
TestGetNextIntHandleFunction · 0.74
getExpectedRangesFunction · 0.74