cockroach: Index | Files

package colencoding

import ""


Package Files

key_encoding.go value_encoding.go

func DecodeIndexKeyToCols Uses

func DecodeIndexKeyToCols(
    vecs []coldata.Vec,
    idx uint16,
    desc *sqlbase.ImmutableTableDescriptor,
    index *sqlbase.IndexDescriptor,
    indexColIdx []int,
    types []types.T,
    colDirs []sqlbase.IndexDescriptor_Direction,
    key roachpb.Key,
) (remainingKey roachpb.Key, matches bool, _ error)

DecodeIndexKeyToCols decodes an index key into the idx'th position of the provided slices of exec.ColVecs. The input index key must already have its first table id / index id prefix removed. If matches is false, the key is from a different table, and the returned remainingKey indicates a "seek prefix": the next key that might be part of the table being searched for. The input key will also be mutated if matches is false. See the analog in sqlbase/index_encoding.go.

func DecodeKeyValsToCols Uses

func DecodeKeyValsToCols(
    vecs []coldata.Vec,
    idx uint16,
    indexColIdx []int,
    types []types.T,
    directions []sqlbase.IndexDescriptor_Direction,
    unseen *util.FastIntSet,
    key []byte,
) ([]byte, error)

DecodeKeyValsToCols decodes the values that are part of the key, writing the result to the idx'th slot of the input slice of exec.ColVecs. If the directions slice is nil, the direction used will default to encoding.Ascending. If the unseen int set is non-nil, upon decoding the column with ordinal i, i will be removed from the set to facilitate tracking whether or not columns have been observed during decoding. See the analog in sqlbase/index_encoding.go.

func DecodeTableValueToCol Uses

func DecodeTableValueToCol(
    vec coldata.Vec, idx uint16, typ encoding.Type, dataOffset int, valTyp *types.T, b []byte,
) ([]byte, error)

DecodeTableValueToCol decodes a value encoded by EncodeTableValue, writing the result to the idx'th position of the input exec.Vec. See the analog in sqlbase/column_type_encoding.go.

func UnmarshalColumnValueToCol Uses

func UnmarshalColumnValueToCol(
    vec coldata.Vec, idx uint16, typ *types.T, value roachpb.Value,
) error

UnmarshalColumnValueToCol decodes the value from a roachpb.Value using the type expected by the column, writing into the input Vec at the given row idx. An error is returned if the value's type does not match the column's type. See the analog, UnmarshalColumnValue, in sqlbase/column_type_encoding.go

Package colencoding imports 9 packages (graph) and is imported by 1 packages. Updated 2019-09-16. Refresh now. Tools for package owners.