Documentation ¶
Index ¶
- func ColumnsToProto(columns []*model.ColumnInfo, pkIsHandle bool) []*tipb.ColumnInfo
- func DecodeIndexKey(key kv.Key) ([]types.Datum, error)
- func DecodeRowKey(key kv.Key) (handle int64, err error)
- func DecodeValues(data []byte, fts []*types.FieldType, inIndex bool) ([]types.Datum, error)
- func EncodeColumnKey(tableID int64, handle int64, columnID int64) kv.Key
- func EncodeIndexRanges(tid, idxID int64, rans []*tipb.KeyRange) []kv.KeyRange
- func EncodeIndexSeekKey(tableID int64, idxID int64, encodedValue []byte) kv.Key
- func EncodeRowKey(tableID int64, encodedHandle []byte) kv.Key
- func EncodeTableRanges(tid int64, rans []*tipb.KeyRange) []kv.KeyRange
- func IndexToProto(t *model.TableInfo, idx *model.IndexInfo) *tipb.IndexInfo
- func ProtoColumnsToFieldTypes(pColumns []*tipb.ColumnInfo) []*types.FieldType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnsToProto ¶
func ColumnsToProto(columns []*model.ColumnInfo, pkIsHandle bool) []*tipb.ColumnInfo
ColumnsToProto converts a slice of model.ColumnInfo to a slice of tipb.ColumnInfo.
func DecodeIndexKey ¶
DecodeIndexKey decodes datums from an index key.
func DecodeRowKey ¶
DecodeRowKey decodes the key and gets the handle.
func DecodeValues ¶
DecodeValues decodes a byte slice into datums with column types.
func EncodeColumnKey ¶
EncodeColumnKey encodes the table id, row handle and columnID into a kv.Key
func EncodeIndexRanges ¶
EncodeIndexRanges encodes index ranges into kv.KeyRanges.
func EncodeIndexSeekKey ¶
EncodeIndexSeekKey encodes an index value to kv.Key.
func EncodeRowKey ¶
EncodeRowKey encodes the table id and record handle into a kv.Key
func EncodeTableRanges ¶
EncodeTableRanges encodes table ranges into kv.KeyRanges.
func IndexToProto ¶
IndexToProto converts a model.IndexInfo to a tipb.IndexInfo.
func ProtoColumnsToFieldTypes ¶
ProtoColumnsToFieldTypes converts tipb column info slice to FieldTyps slice.
Types ¶
This section is empty.