tidb: github.com/pingcap/tidb/util/rowDecoder Index | Files

package decoder

import "github.com/pingcap/tidb/util/rowDecoder"

Index

Package Files

decoder.go

func BuildFullDecodeColMap Uses

func BuildFullDecodeColMap(indexedCols []*table.Column, t table.Table, genExprProducer func(*table.Column) (expression.Expression, error)) (map[int64]Column, error)

BuildFullDecodeColMap build a map that contains [columnID -> struct{*table.Column, expression.Expression}] from indexed columns and all of its depending columns. `genExprProducer` is used to produce a generated expression based on a table.Column.

func RemoveUnusedVirtualCols Uses

func RemoveUnusedVirtualCols(decodeColMap map[int64]Column, indexedCols []*table.Column)

RemoveUnusedVirtualCols removes all virtual columns in decodeColMap that cannot found in indexedCols.

func SubstituteGenColsInDecodeColMap Uses

func SubstituteGenColsInDecodeColMap(decodeColMap map[int64]Column)

SubstituteGenColsInDecodeColMap substitutes generated columns in every expression with non-generated one by looking up decodeColMap.

type Column Uses

type Column struct {
    Col     *table.Column
    GenExpr expression.Expression
}

Column contains the info and generated expr of column.

type RowDecoder Uses

type RowDecoder struct {
    // contains filtered or unexported fields
}

RowDecoder decodes a byte slice into datums and eval the generated column value.

func NewRowDecoder Uses

func NewRowDecoder(tbl table.Table, decodeColMap map[int64]Column) *RowDecoder

NewRowDecoder returns a new RowDecoder.

func (*RowDecoder) DecodeAndEvalRowWithMap Uses

func (rd *RowDecoder) DecodeAndEvalRowWithMap(ctx sessionctx.Context, handle int64, b []byte, decodeLoc, sysLoc *time.Location, row map[int64]types.Datum) (map[int64]types.Datum, error)

DecodeAndEvalRowWithMap decodes a byte slice into datums and evaluates the generated column value.

Package decoder imports 11 packages (graph) and is imported by 8 packages. Updated 2019-08-20. Refresh now. Tools for package owners.