package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Packages

# Functions

CutCommonHandle cuts encoded common handle key into colIDs to bytes slices.
CutIndexKey cuts encoded index key into colIDs to bytes slices map.
CutIndexKeyNew cuts encoded index key into colIDs to bytes slices.
CutIndexKeyTo cuts encoded index key into colIDs to bytes slices.
CutIndexPrefix cuts the index prefix.
CutRowKeyPrefix cuts the row key prefix.
CutRowNew cuts encoded row into byte slices and return columns' byte slice.
DecodeColumnValue decodes data to a Datum according to the column info.
DecodeColumnValueWithDatum decodes data to an existing Datum according to the column info.
DecodeHandleInIndexValue decodes handle in unqiue index value.
DecodeHandleToDatumMap decodes a handle into datum map.
DecodeIndexHandle uses to decode the handle from index key/value.
DecodeIndexID decodes indexID from the key.
DecodeIndexKey decodes the key and gets the tableID, indexID, indexValues.
DecodeIndexKV uses to decode index key values.
DecodeIndexKVEx looks like DecodeIndexKV, the difference is that it tries to reduce allocations.
DecodeIntHandleInIndexValue uses to decode index value as int handle id.
DecodeKeyHead decodes the key's head and gets the tableID, indexID.
DecodeMetaKey decodes the key and get the meta key and meta field.
DecodeRecordKey decodes the key and gets the tableID, handle.
DecodeRowKey decodes the key and gets the handle.
DecodeRowToDatumMap decodes a byte slice into datums.
DecodeRowWithMap decodes a byte slice into datums with an existing row map.
DecodeRowWithMapNew decode a row to datum map.
DecodeTableID decodes the table ID of the key, if the key is not table key, returns 0.
DecodeTempIndexValue decodes the temp index value.
DecodeValuesBytesToStrings decode the raw bytes to strings for each columns.
EncodeHandleInUniqueIndexValue encodes handle in data.
EncodeIndexSeekKey encodes an index value to kv.Key.
EncodeMetaKey encodes the key and field into meta key.
EncodeMetaKeyPrefix encodes the key prefix into meta key.
EncodeOldRow encode row data and column ids into a slice of byte.
EncodeRecordKey encodes the recordPrefix, row handle into a kv.Key.
EncodeRow encode row data and column ids into a slice of byte.
EncodeRowKey encodes the table id and record handle into a kv.Key.
EncodeRowKeyWithHandle encodes the table id, row handle into a kv.Key.
EncodeTableIndexPrefix encodes index prefix with tableID and idxID.
EncodeTablePrefix encodes the table prefix to generate a key.
EncodeValue encodes a go value to bytes.
GenIndexKey generates index key using input physical table id.
GenIndexValueForClusteredIndexVersion1 generates the index value for the clustered index with version 1(New in v5.0.0).
GenIndexValuePortal is the portal for generating index value.
GenTableIndexPrefix composes index prefix with tableID: "t[tableID]_i".
GenTablePrefix composes table record and index prefix: "t[tableID]".
GenTableRecordPrefix composes record prefix with tableID: "t[tableID]_r".
GetIndexKeyBuf reuse or allocate buffer.
GetTableHandleKeyRange returns table handle's key range with tableID.
GetTableIndexKeyRange returns table index's key range with tableID and indexID.
IndexKey2TempIndexKey generates a temporary index key.
IndexKVIsUnique uses to judge if an index is unique, it can handle the KV committed by txn already, it doesn't consider the untouched flag.
IsIndexKey is used to check whether the key is an index key.
IsRecordKey is used to check whether the key is an record key.
IsTableKey is used to check whether the key is a table key.
IsTempIndexKey checks whether the input key is for a temp index.
IsUntouchedIndexKValue uses to check whether the key is index key, and the value is untouched, since the untouched index key/value is no need to commit.
MetaPrefix returns meta prefix 'm'.
SplitIndexValue decodes segments in index value for both non-clustered and clustered table.
TablePrefix returns table's prefix 't'.
TempIndexKey2IndexKey generates an index key from temporary index key.
TempIndexValueIsUntouched returns true if the value is untouched.
TruncateIndexValue truncate one value in the index.
TruncateIndexValues truncates the index values created using only the leading part of column values.
TruncateToRowKeyLen truncates the key to row key length if the key is longer than row key.
TryGetCommonPkColumnRestoredIds get the IDs of primary key columns which need restored data if the table has common handle.
Unflatten converts a raw datum to a column datum.
UnflattenDatums converts raw datums to column datums.
VerifyTableIDForRanges verifies that all given ranges are valid to decode the table id.

# Constants

CommonHandleFlag is the flag used to decode the common handle in an unique index value.
HandleDefault means decode handle value as int64 or bytes when DecodeIndexKV.
HandleIsUnsigned means decode handle value as uint64 when DecodeIndexKV.
HandleNotNeeded means no need to decode handle value when DecodeIndexKV.
IndexIDMask used to get index id from index ID/temp index ID.
IndexVersionFlag is the flag used to decode the index's version info.
MaxOldEncodeValueLen is the maximum len of the old encoding of index value.
PartitionIDFlag is the flag used to decode the partition ID in global index value.
handle*/.
RestoreDataFlag is the flag that RestoreData begin with.
TableSplitKeyLen is the length of key 't{table_id}' which is used for table split.
TempIndexKeyTypeBackfill indicates this value is written in the backfill stage.
TempIndexKeyTypeDelete indicates this value is written in the delete-only stage.
TempIndexKeyTypeMerge indicates this value is written in the merge stage.
TempIndexKeyTypeNone means the key is not a temporary index key.
TempIndexKeyTypePartitionIDFlag indicates the following value is partition id.
TempIndexPrefix used to generate temporary index ID from index ID.
TempIndexValueFlagDeleted means the following value is the distinct and deleted index value.
TempIndexValueFlagNonDistinctDeleted means the following value is the non-distinct deleted index value.
TempIndexValueFlagNonDistinctNormal means the following value is the non-distinct normal index value.
TempIndexValueFlagNormal means the following value is a distinct the normal index value.

# Structs

IndexValueSegments use to store result of SplitIndexValue.
TempIndexValueElem represents a history index operations on the original index.

# Type aliases

HandleStatus is the handle status in index.
TempIndexValue is the value of temporary index.
TempIndexValueFlag is the flag of temporary index value.