updated changelog and exposed search.TokenFunctions

This commit is contained in:
Gani Georgiev
2025-04-15 12:24:13 +03:00
parent 46186f84f0
commit bf9a7b1e3d
4 changed files with 14 additions and 12 deletions

View File

@@ -6,12 +6,12 @@ import (
"github.com/ganigeorgiev/fexpr"
)
var tokenFunctions = map[string]func(
var TokenFunctions = map[string]func(
argTokenResolverFunc func(fexpr.Token) (*ResolverResult, error),
args ...fexpr.Token,
) (*ResolverResult, error){
// geoDistance(lonA, latA, lonB, latB) calculates the Haversine
// distance between 2 coordinates in kilometres (https://www.movable-type.co.uk/scripts/latlong.html).
// distance between 2 points in kilometres (https://www.movable-type.co.uk/scripts/latlong.html).
//
// The accepted arguments at the moment could be either a plain number or a column identifier (including NULL).
// If the column identifier cannot be resolved and converted to a numeric value, it resolves to NULL.