Documentation ¶
Index ¶
- Variables
- func DetectRootAggFunc(exp ast.Expr) (AggEnabledType, AggFuncType, []ast.Expr)
- func GetAggStringSeparator(aggFuncArgs []ast.Expr) (string, error)
- func StringSetToStringSlice(m map[string]struct{}) []string
- func StringSliceToStringSet(slice []string) map[string]struct{}
- type AggDataType
- type AggEnabledType
- type AggFuncType
- type AvgCollector
- type EvalCtx
- func NewPlainEvalCtx(aggEnabled AggEnabledType) EvalCtx
- func NewPlainEvalCtxAndInitializedAgg(aggEnabled AggEnabledType, aggFuncType AggFuncType, aggFuncArgs []ast.Expr) (*EvalCtx, error)
- func NewPlainEvalCtxWithVars(aggEnabled AggEnabledType, vars *VarValuesMap) EvalCtx
- func NewPlainEvalCtxWithVarsAndInitializedAgg(aggEnabled AggEnabledType, vars *VarValuesMap, aggFuncType AggFuncType, ...) (*EvalCtx, error)
- func (eCtx *EvalCtx) CallAggAvg(callExp *ast.CallExpr, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) CallAggCount(callExp *ast.CallExpr, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) CallAggMax(callExp *ast.CallExpr, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) CallAggMin(callExp *ast.CallExpr, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) CallAggStringAgg(callExp *ast.CallExpr, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) CallAggSum(callExp *ast.CallExpr, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) Eval(exp ast.Expr) (interface{}, error)
- func (eCtx *EvalCtx) EvalBinaryBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalBinaryBoolToBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalBinaryDecimal2(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (result decimal.Decimal, err error)
- func (eCtx *EvalCtx) EvalBinaryDecimal2ToBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalBinaryFloat64(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (float64, error)
- func (eCtx *EvalCtx) EvalBinaryFloat64ToBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalBinaryInt(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (result int64, finalErr error)
- func (eCtx *EvalCtx) EvalBinaryIntToBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalBinaryString(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (string, error)
- func (eCtx *EvalCtx) EvalBinaryStringToBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalBinaryTimeToBool(valLeftVolatile interface{}, op token.Token, valRightVolatile interface{}) (bool, error)
- func (eCtx *EvalCtx) EvalFunc(callExp *ast.CallExpr, funcName string, args []interface{}) (interface{}, error)
- func (eCtx *EvalCtx) EvalUnaryBoolNot(exp ast.Expr) (bool, error)
- func (eCtx *EvalCtx) EvalUnaryMinus(exp ast.Expr) (interface{}, error)
- type MaxCollector
- type MinCollector
- type StringAggCollector
- type SumCollector
- type VarValuesMap
Constants ¶
This section is empty.
Variables ¶
View Source
var GolangConstants map[string]interface{} = map[string]interface{}{ "time.January": time.January, "time.February": time.February, "time.March": time.March, "time.April": time.April, "time.May": time.May, "time.June": time.June, "time.July": time.July, "time.August": time.August, "time.September": time.September, "time.October": time.October, "time.November": time.November, "time.December": time.December, "time.UTC": time.UTC}
Functions ¶
func DetectRootAggFunc ¶ added in v1.1.4
func DetectRootAggFunc(exp ast.Expr) (AggEnabledType, AggFuncType, []ast.Expr)
func GetAggStringSeparator ¶ added in v1.1.4
func StringSetToStringSlice ¶
func StringSliceToStringSet ¶
Types ¶
type AggDataType ¶
type AggDataType string
const ( AggTypeUnknown AggDataType = "unknown" AggTypeInt AggDataType = "int" AggTypeFloat AggDataType = "float" AggTypeDec AggDataType = "decimal" AggTypeString AggDataType = "string" )
type AggEnabledType ¶
type AggEnabledType int
const ( AggFuncDisabled AggEnabledType = iota AggFuncEnabled )
type AggFuncType ¶
type AggFuncType string
const ( AggStringAgg AggFuncType = "string_agg" AggSum AggFuncType = "sum" AggCount AggFuncType = "count" AggAvg AggFuncType = "avg" AggMin AggFuncType = "min" AggMax AggFuncType = "max" AggUnknown AggFuncType = "unknown" )
func StringToAggFunc ¶
func StringToAggFunc(testString string) AggFuncType
type AvgCollector ¶
type EvalCtx ¶
type EvalCtx struct { Vars *VarValuesMap AggFunc AggFuncType AggType AggDataType AggCallExp *ast.CallExpr Count int64 StringAgg StringAggCollector Sum SumCollector Avg AvgCollector Min MinCollector Max MaxCollector Value interface{} AggEnabled AggEnabledType }
func NewPlainEvalCtx ¶
func NewPlainEvalCtx(aggEnabled AggEnabledType) EvalCtx
func NewPlainEvalCtxAndInitializedAgg ¶ added in v1.1.4
func NewPlainEvalCtxAndInitializedAgg(aggEnabled AggEnabledType, aggFuncType AggFuncType, aggFuncArgs []ast.Expr) (*EvalCtx, error)
func NewPlainEvalCtxWithVars ¶
func NewPlainEvalCtxWithVars(aggEnabled AggEnabledType, vars *VarValuesMap) EvalCtx
func NewPlainEvalCtxWithVarsAndInitializedAgg ¶ added in v1.1.4
func NewPlainEvalCtxWithVarsAndInitializedAgg(aggEnabled AggEnabledType, vars *VarValuesMap, aggFuncType AggFuncType, aggFuncArgs []ast.Expr) (*EvalCtx, error)
func (*EvalCtx) CallAggAvg ¶
func (*EvalCtx) CallAggCount ¶
func (*EvalCtx) CallAggMax ¶
func (*EvalCtx) CallAggMin ¶
func (*EvalCtx) CallAggStringAgg ¶ added in v1.1.4
func (*EvalCtx) CallAggSum ¶
func (*EvalCtx) EvalBinaryBool ¶
func (*EvalCtx) EvalBinaryBoolToBool ¶
func (*EvalCtx) EvalBinaryDecimal2 ¶
func (*EvalCtx) EvalBinaryDecimal2ToBool ¶
func (*EvalCtx) EvalBinaryFloat64 ¶
func (*EvalCtx) EvalBinaryFloat64ToBool ¶
func (*EvalCtx) EvalBinaryInt ¶
func (*EvalCtx) EvalBinaryIntToBool ¶
func (*EvalCtx) EvalBinaryString ¶
func (*EvalCtx) EvalBinaryStringToBool ¶
func (*EvalCtx) EvalBinaryTimeToBool ¶
func (*EvalCtx) EvalUnaryBoolNot ¶
type MaxCollector ¶
type MinCollector ¶
type StringAggCollector ¶ added in v1.1.4
type VarValuesMap ¶
func (*VarValuesMap) Names ¶
func (vars *VarValuesMap) Names() string
func (*VarValuesMap) Tables ¶
func (vars *VarValuesMap) Tables() string
Click to show internal directories.
Click to hide internal directories.