Documentation ¶
Index ¶
- func DecodeBytes(b []byte) ([]byte, []byte, error)
- func DecodeRegionMetaKey(r *metapb.Region) error
- func DecodeUintDesc(b []byte) ([]byte, uint64, error)
- func EncodeBytes(b []byte) []byte
- func EncodeInt(b []byte, v int64) []byte
- func EncodeIntToCmpUint(v int64) uint64
- func EncodeTableIndexPrefix(tableID, idxID int64) key.Key
- func EncodeUintDesc(b []byte, v uint64) []byte
- func GenTableIndexPrefix(tableID int64) key.Key
- func GenTableRecordPrefix(tableID int64) key.Key
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
DecodeBytes decodes a TiDB encoded byte slice.
func DecodeRegionMetaKey ¶
DecodeRegionMetaKey translates a region meta from encoded form to unencoded form.
func DecodeUintDesc ¶
DecodeUintDesc decodes value encoded by EncodeInt before. It returns the leftover un-decoded slice, decoded value if no error.
func EncodeBytes ¶
EncodeBytes encodes a byte slice into TiDB's encoded form.
func EncodeInt ¶
EncodeInt appends the encoded value to slice b and returns the appended slice. EncodeInt guarantees that the encoded value is in ascending order for comparison.
func EncodeIntToCmpUint ¶
EncodeIntToCmpUint make int v to comparable uint type
func EncodeTableIndexPrefix ¶
EncodeTableIndexPrefix encodes index prefix with tableID and idxID.
func EncodeUintDesc ¶
EncodeUintDesc appends the encoded value to slice b and returns the appended slice. EncodeUintDesc guarantees that the encoded value is in descending order for comparison.
func GenTableIndexPrefix ¶
GenTableIndexPrefix composes index prefix with tableID: "t[tableID]_i".
func GenTableRecordPrefix ¶
GenTableRecordPrefix composes record prefix with tableID: "t[tableID]_r".
Types ¶
This section is empty.