function

package
v0.0.0-...-079bc26 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package function provides built-in functions for xxldb

Index

Constants

This section is empty.

Variables

View Source
var Registry = make(map[string]Function)

Registry holds all registered functions

Functions

func Call

func Call(name string, args []types.Value) (types.Value, error)

Call calls a function by name

func HasAggregate

func HasAggregate(expr string) bool

HasAggregate checks if an expression contains aggregate functions

func IsAggregate

func IsAggregate(name string) bool

IsAggregate checks if a function is an aggregate function

func Register

func Register(name string, fn Function)

Register registers a function

Types

type FolderEntry

type FolderEntry struct {
	Name     string        `json:"name"`
	IsDir    bool          `json:"is_dir"`
	Size     int64         `json:"size,omitempty"`
	ModTime  string        `json:"mod_time,omitempty"`
	Content  []byte        `json:"content,omitempty"`
	Children []FolderEntry `json:"children,omitempty"`
}

FolderEntry represents a file or folder entry

type Function

type Function func(args []types.Value) (types.Value, error)

Function represents a built-in function

func Get

func Get(name string) (Function, bool)

Get retrieves a function by name

type ImageInfo

type ImageInfo struct {
	Width  int    `json:"width"`
	Height int    `json:"height"`
	Format string `json:"format"`
	Size   int    `json:"size"`
	Mime   string `json:"mime"`
}

ImageInfo holds image metadata

Jump to

Keyboard shortcuts

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