extdef

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregate added in v1.2.0

type Aggregate struct {
	Name        string
	Parameters  []Parameter
	Returns     string
	StateType   string
	Transition  string
	Final       string
	Combine     string
	InitCond    string
	HasInitCond bool
}

Aggregate is an aggregate function that an extension provides.

type Cast added in v1.2.0

type Cast struct {
	Source   string
	Target   string
	Routine  string
	CastType casts.CastType
}

Cast is a cast that an extension provides.

type Control

type Control struct {
	DefaultVersion string
	Comment        string
	Requires       []string
	Superuser      bool
	Trusted        bool
	Relocatable    bool
	Schema         string
}

Control holds the information that an extension declares in its control file. https://www.postgresql.org/docs/15/extend-extensions.html#id-1.8.3.20.11

type Extension

type Extension struct {
	Name       string
	Control    Control
	Types      []Type
	Routines   []Routine
	Operators  []Operator
	Casts      []Cast
	Aggregates []Aggregate
}

Extension is a Postgres extension that Doltgres emulates.

type Function

type Function func(ctx *sql.Context, args ...any) (any, error)

Function is the Go implementation of a single function that an extension provides.

type Operator added in v1.2.0

type Operator struct {
	Symbol     string
	Left       string
	Right      string
	Routine    string
	Commutator string
	Negator    string
	Hashes     bool
	Merges     bool
}

Operator is an operator that an extension provides.

type Parameter

type Parameter struct {
	Name string
	Type string
}

Parameter is a single input parameter of a routine.

type Routine

type Routine struct {
	Name       string
	Symbol     string
	Parameters []Parameter
	Returns    string
	Strict     bool
	Impl       Function
}

Routine is a function that an extension provides. Symbol is its C link symbol, which is unique within the extension.

type Type added in v1.2.0

type Type struct {
	Name       string
	Definition pgtypes.BaseTypeDefinition
	Input      string
	Output     string
	Receive    string
	Send       string
	ModIn      string
	ModOut     string
}

Type is a base type that an extension provides. Definition carries every option except the support functions, which are named here.

Jump to

Keyboard shortcuts

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