Documentation
¶
Index ¶
- func Evaluate(n CCLNode, ctx Context) (any, error)
- func GetAssignmentTarget(n CCLNode) (string, bool)
- func IsAssignmentNode(n CCLNode) bool
- func IsNewColNode(n CCLNode) bool
- func IsRowDependent(n CCLNode) bool
- func RegisterAggregateFunction(name string, fn AggFunc)
- func RegisterFunction(name string, fn Func)
- func RegisterStandardFunctions()
- func ResetEvalDepth()
- func ResetFuncCallDepth()
- type AggFunc
- type CCLNode
- type Context
- type EvaluationResult
- type Func
- type MapContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssignmentTarget ¶
GetAssignmentTarget returns the assignment target column name/index.
func IsAssignmentNode ¶
IsAssignmentNode reports whether the node is an assignment.
func IsNewColNode ¶
IsNewColNode reports whether the node creates a new column.
func IsRowDependent ¶
IsRowDependent reports whether the node depends on row context.
func RegisterAggregateFunction ¶
RegisterAggregateFunction registers a custom aggregate function.
func RegisterFunction ¶
RegisterFunction registers a custom scalar function.
func RegisterStandardFunctions ¶
func RegisterStandardFunctions()
RegisterStandardFunctions registers the built-in CCL functions.
func ResetFuncCallDepth ¶
func ResetFuncCallDepth()
ResetFuncCallDepth resets the function call depth counter.
Types ¶
type AggFunc ¶
type AggFunc = internalccl.AggFunc
type CCLNode ¶
type CCLNode = internalccl.CCLNode
func CompileExpression ¶
CompileExpression compiles a CCL expression into an AST.
func CompileMultiline ¶
CompileMultiline compiles a multi-line CCL script into AST nodes.
func GetExpressionNode ¶
GetExpressionNode returns the expression node for a statement.
type EvaluationResult ¶
type EvaluationResult = internalccl.EvaluationResult
func EvaluateStatement ¶
func EvaluateStatement(n CCLNode, ctx Context) (*EvaluationResult, error)
EvaluateStatement evaluates a CCL statement and returns detailed result.
type Func ¶
type Func = internalccl.Func
type MapContext ¶
type MapContext = internalccl.MapContext
func NewMapContext ¶
func NewMapContext(data map[string][]any) (*MapContext, error)
NewMapContext creates a map-based CCL context.