Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateFunction ¶
func EvaluateFunction(name string, args []string, ctx Context) (value interface{}, found bool, err error)
EvaluateFunction evaluates a function by name.
Returns:
- value: the function result
- found: whether the function name is registered
- err: evaluation error (only meaningful if found is true)
Types ¶
type Context ¶
type Context struct {
Nodes map[string]*storage.Node
Rels map[string]*storage.Edge
Eval func(expr string) (interface{}, error)
Now func() time.Time
}
Context provides runtime access for function evaluation without importing the parent `cypher` package (avoids import cycles).
Eval must evaluate a Cypher expression in the caller's scope (row bindings). Functions can use Eval for lazy argument evaluation (e.g. coalesce).
Click to show internal directories.
Click to hide internal directories.