plan

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package plan provides logic for building execution plan

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	*et.Control

	Metric metric.Stmt
	// contains filtered or unexported fields
}

Scope represents compilation scope

func NewScope

func NewScope(options ...option.Option) *Scope

NewScope creates compilation scope

func (*Scope) BoolExpression

func (s *Scope) BoolExpression(exprStmt string) (*expr.Bool, error)

BoolExpression returns bool expression

func (*Scope) Compile

func (s *Scope) Compile(expr string) (*exec.Executor, error)

Compile parses and compile simple golang expression into execution tree

func (*Scope) DefineEmbedVariable

func (s *Scope) DefineEmbedVariable(name string, t reflect.Type) error

DefineEmbedVariable defines embeded variable

func (*Scope) DefineVariable

func (s *Scope) DefineVariable(name string, fType reflect.Type) (*exec.Selector, error)

DefineVariable defines variables

func (*Scope) EmbedType

func (s *Scope) EmbedType(name string, t reflect.Type)

EmbedType embeds supplied type

func (*Scope) Float64Expression

func (s *Scope) Float64Expression(exprStmt string) (*expr.Float64, error)

Float64Expression returns float64 expression

func (*Scope) Function

func (s *Scope) Function(expr string) (interface{}, error)

Function compile function

func (*Scope) IntExpression

func (s *Scope) IntExpression(exprStmt string) (*expr.Int, error)

IntExpression returns an int expression

func (*Scope) Parse

func (s *Scope) Parse(expr string) (ast.Stmt, error)

Parse returns an ast for the supploed expression

func (*Scope) RegisterFunc

func (s *Scope) RegisterFunc(name string, fn interface{})

RegisterFunc register func

func (*Scope) RegisterNamedType

func (s *Scope) RegisterNamedType(name string, t reflect.Type)

RegisterNamedType register named type

func (*Scope) RegisterType

func (s *Scope) RegisterType(t reflect.Type) error

RegisterType register type

func (*Scope) ResolveSelector

func (s *Scope) ResolveSelector(selector string) (*exec.Selector, error)

ResolveSelector returns existing or registerSelector selector to the scope

func (*Scope) Selector

func (s *Scope) Selector(expr string) (*exec.Selector, error)

Selector returns a selector

func (*Scope) StringExpression

func (s *Scope) StringExpression(exprStmt string) (*expr.String, error)

StringExpression returns string expression

func (*Scope) StringifyExpr

func (s *Scope) StringifyExpr(expr ast.Expr) (string, error)

StringifyExpr returns sting representation of expression

func (*Scope) SubScope

func (s *Scope) SubScope(options ...option.Option) *Scope

func (*Scope) UpdateVariable

func (s *Scope) UpdateVariable(name string, fType reflect.Type) (*exec.Selector, error)

UpdateVariable updated variable type

Jump to

Keyboard shortcuts

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