xeval

package
v0.0.0-...-40faf7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeInvalid = 3
)

Error codes.

Variables

View Source
var (
	ErrInvalid = terror.ClassXEval.New(CodeInvalid, "invalid operation")
)

Error instances.

Functions

func ComputeArithmetic

func ComputeArithmetic(op tipb.ExprType, left types.Datum, right types.Datum) (types.Datum, error)

ComputeArithmetic computes the arithmetic operation on two datums.

func ComputeBit

func ComputeBit(op tipb.ExprType, left, right types.Datum) (types.Datum, error)

ComputeBit computes the bitwise operation on two datums.

Types

type Evaluator

type Evaluator struct {
	Row map[int64]types.Datum // column values.
	// contains filtered or unexported fields
}

Evaluator evaluates tipb.Expr.

func (*Evaluator) Eval

func (e *Evaluator) Eval(expr *tipb.Expr) (types.Datum, error)

Eval evaluates expr to a Datum.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL