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

Struct Function2N

server/functions/framework/functions.go:116–124  ·  view source on GitHub ↗

Function2N is a function that takes at least two parameters. This is different from a SQL variadic function, as the additional parameters may have different types (that do not contribute to type deduction like with `anyelement`), and is only usable by C-language functions (notably built-in ones such

Source from the content-addressed store, hash-verified

114// is only usable by C-language functions (notably built-in ones such as `concat_ws`). The field `paramsAndReturn` works
115// similarly to standard functions, with the last type being the return type.
116type Function2N struct {
117 Name string
118 Return *pgtypes.DoltgresType
119 Parameters [2]*pgtypes.DoltgresType
120 IsNonDeterministic bool
121 Strict bool
122 SRF bool
123 Callable func(ctx *sql.Context, paramsAndReturn []*pgtypes.DoltgresType, val1 any, val2 any, vals []any) (any, error)
124}
125
126// Function3 is a function that takes three parameters. The parameter and return types are passed into the Callable
127// function when the parameters (and possibly return type) have at least one polymorphic type. The return type is the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected