Module tidb_query_datatype::codec::datum[][src]

Enums

Datum

Datum stores data with different types.

Constants

BYTES_FLAG
COMPACT_BYTES_FLAG
DATUM_DATA_NULL
DECIMAL_FLAG
DURATION_FLAG
FLOAT_FLAG
INT_FLAG
JSON_FLAG
MAX_FLAG
NIL_FLAG
UINT_FLAG
VAR_INT_FLAG
VAR_UINT_FLAG

Traits

DatumDecoder

DatumDecoder decodes the datum.

DatumEncoder

DatumEncoder encodes the datum.

Functions

approximate_size

Get the approximate needed buffer size of values.

checked_add_i64

checked_add_i64 checks and adds r to the l. Return None if the sum is negative.

cmp_f64

cmp_f64 compares the f64 values and returns the Ordering.

decode

decode decodes all datum from a byte slice generated by tidb.

encode

encode encodes a datum slice into a buffer. Uses comparable to encode or not to encode a memory comparable buffer.

encode_key

encode_key encodes a datum slice into a memory comparable buffer as the key.

encode_to

encode_to encodes a datum slice and appends the buffer to a vector. Uses comparable to encode a memory comparable buffer or not.

encode_value

encode_value encodes a datum slice into a buffer.

skip_n

skip_n_datum_slices skip n datum slices within buf and advances the buffer pointer. If the datum buffer contains less than n slices, an error will be returned.

split_datum

Split bytes array into two part: first one is a whole datum’s encoded data, and the second part is the remaining data.