runtime

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgInfo

type ArgInfo struct {
	Type     DataColumnType
	IsConst  bool
	ConstVal interface{}
}

type HostFuncGen

type HostFuncGen = func(rt *Runtime, argsInfo []ArgInfo) (HostFunction, DataColumnType, error)

type HostFunction

type HostFunction = func(i int, args ...interface{}) (interface{}, error)

type Runtime

type Runtime struct {
	ErrorFlag int32
	Err       error
	Ctx       *RuntimeContext
	Stack     []StackLeaf
	StackUsed bool
	PrevRow   int
}

func NewRuntime

func NewRuntime(ctx *RuntimeContext) *Runtime

type RuntimeContext

type RuntimeContext struct {
	Consts map[string]interface{}
	Vars   map[string]interface{}
	Funcs  map[string]HostFuncGen
}

func NewRuntimeContext

func NewRuntimeContext() *RuntimeContext

type StackLeaf

type StackLeaf struct {
	Type DataColumnType
	Val  interface{}
}

Jump to

Keyboard shortcuts

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