MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Function2

Struct Function2

server/functions/framework/functions.go:101–110  ·  view source on GitHub ↗

Function2 is a function that takes two parameters. The parameter and return types are passed into the Callable function when the parameters (and possibly return type) have at least one polymorphic type. The return type is the last type in the array.

Source from the content-addressed store, hash-verified

99// function when the parameters (and possibly return type) have at least one polymorphic type. The return type is the
100// last type in the array.
101type Function2 struct {
102 Name string
103 Return *pgtypes.DoltgresType
104 Parameters [2]*pgtypes.DoltgresType
105 Variadic bool
106 IsNonDeterministic bool
107 Strict bool
108 SRF bool
109 Callable func(ctx *sql.Context, paramsAndReturn [3]*pgtypes.DoltgresType, val1 any, val2 any) (any, error)
110}
111
112// Function2N is a function that takes at least two parameters. This is different from a SQL variadic function, as the
113// additional parameters may have different types (that do not contribute to type deduction like with `anyelement`), and

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected