Module tidb_query_datatype::codec::table[][src]

Structs

RowColMeta

RowColMeta saves the column meta of the row.

RowColsDict

RowColsDict stores the row data and a map mapping column ID to its meta.

Constants

EXTRA_PARTITION_ID_COL_ID

ID for partition column, see https://github.com/pingcap/parser/pull/1010

ID_LEN
INDEX_PREFIX_SEP
INDEX_VALUE_COMMON_HANDLE_FLAG

Flag that indicate if the index value has common handle.

INDEX_VALUE_PARTITION_ID_FLAG

Flag that indicate if the index value has partition id.

INDEX_VALUE_RESTORED_DATA_FLAG

Flag that indicate if the index value has restored data.

INDEX_VALUE_VERSION_FLAG

Flag that indicate if the index values has the version information.

MAX_OLD_ENCODED_VALUE_LEN
PREFIX_LEN
RECORD_PREFIX_SEP
RECORD_ROW_KEY_LEN
SEP_LEN
TABLE_PREFIX
TABLE_PREFIX_KEY_LEN
TABLE_PREFIX_LEN

Traits

TableEncoder

TableEncoder encodes the table record/index prefix.

Functions

check_index_key
check_key_type

check_key_type checks if the key is the type we want, wanted_type should be table::RECORD_PREFIX_SEP or table::INDEX_PREFIX_SEP .

check_record_key
check_table_ranges

Checks if the range is for table record or index.

cut_idx_key

cut_idx_key cuts the encoded index key into RowColsDict and handle .

cut_row

cut_row cuts the encoded row into (col_id,offset,length) and returns interested columns’ meta in RowColsDict

cut_row_v1

Cuts a non-empty row in row format v1.

cut_row_v2

Cuts a non-empty row in row format v2 and encodes into v1 format.

decode_col_value
decode_common_handle

decode_common_handle decodes key key and gets the common handle.

decode_index_key
decode_int_handle

decode_int_handle decodes the key and gets the int handle.

decode_row
decode_table_id

Decodes table ID from the key.

encode_column_key

encode_column_key encodes the table id, row handle and column id into a byte array.

encode_common_handle_for_test
encode_index_seek_key

encode_index_seek_key encodes an index value to byte array.

encode_row
encode_row_key

encode_row_key encodes the table id and record handle into a byte array.

extract_table_prefix

Extracts table prefix from table record or index.

flatten

flatten flattens the datum.

generate_index_data_for_test
unflatten

unflatten converts a raw datum to a column datum.