expr

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalBool added in v1.14.0

func EvalBool(zctx *zed.Context, val vector.Any, e Evaluator) (vector.Any, bool)

EvalBool evaluates e using val to computs a boolean result. For elements of the result that are not boolean, an error is calculated for each non-bool slot and they are returned as an error. If all of the value slots are errors, then the return value is nil.

func ToBool added in v1.14.0

func ToBool(val zed.Value) (bool, bool)

func ToFloat added in v1.14.0

func ToFloat(val zed.Value) (float64, bool)

func ToInt added in v1.14.0

func ToInt(val zed.Value) (int64, bool)

func ToUint added in v1.14.0

func ToUint(val zed.Value) (uint64, bool)

Types

type And added in v1.14.0

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

func NewLogicalAnd added in v1.14.0

func NewLogicalAnd(zctx *zed.Context, lhs, rhs Evaluator) *And

func (*And) Eval added in v1.14.0

func (a *And) Eval(val vector.Any) vector.Any

type Compare added in v1.14.0

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

func NewCompare added in v1.14.0

func NewCompare(zctx *zed.Context, lhs, rhs Evaluator, operator string) *Compare

func (*Compare) Eval added in v1.14.0

func (c *Compare) Eval(val vector.Any) vector.Any

type DotExpr

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

func NewDotExpr

func NewDotExpr(zctx *zed.Context, record Evaluator, field string) *DotExpr

func (*DotExpr) Eval

func (d *DotExpr) Eval(val vector.Any) vector.Any

type Evaluator

type Evaluator interface {
	Eval(vector.Any) vector.Any
}

func NewDottedExpr added in v1.14.0

func NewDottedExpr(zctx *zed.Context, f field.Path) Evaluator

type Literal added in v1.14.0

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

func NewLiteral added in v1.14.0

func NewLiteral(val zed.Value) *Literal

func (Literal) Eval added in v1.14.0

func (l Literal) Eval(val vector.Any) vector.Any

type Not added in v1.14.0

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

func NewLogicalNot added in v1.14.0

func NewLogicalNot(zctx *zed.Context, e Evaluator) *Not

func (*Not) Eval added in v1.14.0

func (n *Not) Eval(val vector.Any) vector.Any

type Or added in v1.14.0

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

func NewLogicalOr added in v1.14.0

func NewLogicalOr(zctx *zed.Context, lhs, rhs Evaluator) *Or

func (*Or) Eval added in v1.14.0

func (o *Or) Eval(val vector.Any) vector.Any

type This

type This struct{}

func (*This) Eval

func (*This) Eval(val vector.Any) vector.Any

Jump to

Keyboard shortcuts

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