function

package
v1.14.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RadToDeg = 180 / math.Pi
	DegToRad = math.Pi / 180
)
View Source
const AnalyticPrefix = "$$a"

Variables

This section is empty.

Functions

func ConvName

func ConvName(name string) (string, bool)

func Function

func Function(name string) (api.Function, error)

func GetFuncType

func GetFuncType(funcName string) ast.FuncType

func GetFunctionPlugin

func GetFunctionPlugin(name string) (plugin.EXTENSION_TYPE, string, string)

func HasFunctionSet

func HasFunctionSet(name string) bool

func Initialize

func Initialize(factories []binder.FactoryEntry) error

Initialize Only call once when server starts

func IsAggFunc

func IsAggFunc(funcName string) bool

func IsAnalyticFunc

func IsAnalyticFunc(name string) bool

func IsWindowFunc

func IsWindowFunc(name string) bool

func NoAggFunc

func NoAggFunc(funcName string) bool

NoAggFunc returns true if the function CANNOT be used in an aggregate query

func ProduceErrInfo

func ProduceErrInfo(index int, expect string) (err error)

ProduceErrInfo Index is starting from 0

func ValidateAtLeast

func ValidateAtLeast(min, actual int) error

func ValidateJsonFunc

func ValidateJsonFunc(_ api.FunctionContext, args []ast.Expr) error

func ValidateLen

func ValidateLen(exp, actual int) error

func ValidateNoArg

func ValidateNoArg(_ api.FunctionContext, args []ast.Expr) error

func ValidateOneArg

func ValidateOneArg(_ api.FunctionContext, args []ast.Expr) error

func ValidateOneNumberArg

func ValidateOneNumberArg(_ api.FunctionContext, args []ast.Expr) error

func ValidateOneStrArg

func ValidateOneStrArg(_ api.FunctionContext, args []ast.Expr) error

func ValidateOneStrOneInt

func ValidateOneStrOneInt(_ api.FunctionContext, args []ast.Expr) error

func ValidateTwoIntArg

func ValidateTwoIntArg(_ api.FunctionContext, args []ast.Expr) error

func ValidateTwoNumberArg

func ValidateTwoNumberArg(_ api.FunctionContext, args []ast.Expr) error

func ValidateTwoStrArg

func ValidateTwoStrArg(_ api.FunctionContext, args []ast.Expr) error

Types

type ColFunc

type ColFunc func(ctx api.FunctionContext, args []interface{}, keys []string) (ResultCols, error)

ColFunc Functions which will return columns directly instead of a map

type IntervalUnit

type IntervalUnit string

type Manager

type Manager struct{}

func GetManager

func GetManager() *Manager

func (*Manager) ConvName

func (m *Manager) ConvName(n string) (string, bool)

func (*Manager) Function

func (m *Manager) Function(name string) (api.Function, error)

Function the name is converted to lowercase if needed during parsing

func (*Manager) FunctionPluginInfo

func (m *Manager) FunctionPluginInfo(funcName string) (plugin.EXTENSION_TYPE, string, string)

func (*Manager) HasFunctionSet

func (m *Manager) HasFunctionSet(name string) bool

type ResultCols

type ResultCols map[string]interface{}

Jump to

Keyboard shortcuts

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