builtinsregistry

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package builtinsregistry stores the definitions of builtin functions.

The builtins package imports this package and registers its functions. This package exists to avoid import cycles so that catalog packages can interact with builtin definitions without needing to import the builtins package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubscription

func AddSubscription(s Subscription)

AddSubscription defines a hook to be called once on all registered builtins. Subscriptions should be added at init() time, but are load-order independent: if you add a subscription after a function is registered, it will immediately be called on that function, while functions that are registered afterwards will also trigger the hook.

func GetBuiltinProperties

func GetBuiltinProperties(name string) (*tree.FunctionProperties, []tree.Overload)

GetBuiltinProperties provides low-level access to a built-in function's properties. For a better, semantic-rich interface consider using tree.FunctionDefinition instead, and resolve function names via ResolvableFunctionReference.Resolve().

func Register

func Register(name string, props *tree.FunctionProperties, overloads []tree.Overload)

Register registers a builtin. Intending to be called at init time, it panics if a function of the same name has already been registered.

Types

type Subscription

type Subscription func(name string, props *tree.FunctionProperties, overloads []tree.Overload)

Subscription is a hook to be called once on all registered builtins.

Jump to

Keyboard shortcuts

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