package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
ConvertByCollation converts these bytes according to its collation.
ConvertByCollationStr converts this string according to its collation.
CutColumnID cuts the column ID from b.
CutOne cuts the first encoded value from b.
Decode decodes values from a byte slice generated with EncodeKey or EncodeValue before.
DecodeAsDateTime decodes on datum from []byte of `KindMysqlTime`.
DecodeAsFloat32 decodes value for mysql.TypeFloat.
DecodeBytes decodes bytes which is encoded by EncodeBytes before, returns the leftover bytes and decoded value if no error.
DecodeBytesDesc decodes bytes which is encoded by EncodeBytesDesc before, returns the leftover bytes and decoded value if no error.
DecodeCmpUintToInt decodes the u that encoded by EncodeIntToCmpUint.
DecodeCompactBytes decodes bytes which is encoded by EncodeCompactBytes before.
DecodeComparableUvarint decodes mem-comparable uvarint.
DecodeComparableVarint decodes mem-comparable varint.
DecodeDecimal decodes bytes to decimal.
DecodeFloat decodes a float from a byte slice generated with EncodeFloat before.
DecodeFloatDesc decodes a float from a byte slice generated with EncodeFloatDesc before.
DecodeInt decodes value encoded by EncodeInt before.
DecodeIntDesc decodes value encoded by EncodeInt before.
DecodeOne decodes on datum from a byte slice generated with EncodeKey or EncodeValue.
DecodeRange decodes the range values from a byte slice that generated by EncodeKey.
DecodeUint decodes value encoded by EncodeUint before.
DecodeUintDesc decodes value encoded by EncodeInt before.
DecodeUvarint decodes value encoded by EncodeUvarint before.
DecodeVarint decodes value encoded by EncodeVarint before.
EncodeBytes guarantees the encoded value is in ascending order for comparison, encoding with the following rule:
[group1][marker1]...[groupN][markerN] group is 8 bytes slice which is padding with 0.
EncodeBytesDesc first encodes bytes using EncodeBytes, then bitwise reverses encoded value to guarantee the encoded value is in descending order for comparison.
EncodeBytesExt is an extension of `EncodeBytes`, which will not encode for `isRawKv = true` but just append `data` to `b`.
EncodeCompactBytes joins bytes with its length into a byte slice.
EncodeComparableUvarint encodes uint64 into mem-comparable bytes.
EncodeComparableVarint encodes an int64 to a mem-comparable bytes.
EncodedBytesLength returns the length of data after encoded.
EncodeDecimal encodes a decimal into a byte slice which can be sorted lexicographically later.
EncodeFloat encodes a float v into a byte slice which can be sorted lexicographically later.
EncodeFloatDesc encodes a float v into a byte slice which can be sorted lexicographically later.
EncodeInt appends the encoded value to slice b and returns the appended slice.
EncodeIntDesc appends the encoded value to slice b and returns the appended slice.
EncodeIntToCmpUint make int v to comparable uint type.
EncodeKey appends the encoded values to byte slice b, returns the appended slice.
EncodeMySQLTime encodes datum of `KindMysqlTime` to []byte.
EncodeUint appends the encoded value to slice b and returns the appended slice.
EncodeUintDesc appends the encoded value to slice b and returns the appended slice.
EncodeUvarint appends the encoded value to slice b and returns the appended slice.
EncodeValue appends the encoded values to byte slice b, returning the appended slice.
EncodeVarint appends the encoded value to slice b and returns the appended slice.
EqualChunkRow returns a boolean reporting whether row1 and row2 with their types and column index are logically equal.
EstimateValueSize uses to estimate the value size of the encoded values.
Hash64 is for datum hash64 calculation.
HashChunkColumns writes the encoded value of each row's column, which of index `colIdx`, to h.
HashChunkRow writes the encoded values to w.
HashChunkSelected writes the encoded value of selected row's column, which of index `colIdx`, to h.
HashCode encodes a Datum into a unique byte slice.
HashGroupKey encodes each row of this column and append encoded data into buf.
NewDecoder creates a Decoder.
SerializeKeys is used in join.
SetRawValues set raw datum values from a row data.
# Constants
IntHandleFlag is only used to encode int handle key.
KeepVarColumnLength when serialize var-length column, whether record the column length or not.
NeedSignFlag when serialize integer column, if the join key is <signed, signed> or <unsigned, unsigned>, the unsigned flag can be ignored, if the join key is <unsigned, signed> or <signed, unsigned> the unsigned flag can not be ignored, if the unsigned flag can not be ignored, the key can not be inlined.
First byte in the encoded value which specifies the encoding type.
Normal means serialize in the normal way.
# Type aliases
SerializeMode is for some special cases during serialize key.