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

Function GetFunction

server/functions/framework/compiled_catalog.go:28–37  ·  view source on GitHub ↗

GetFunction returns the compiled function with the given name and parameters. Returns false if the function could not be found.

(ctx *sql.Context, functionName string, params ...sql.Expression)

Source from the content-addressed store, hash-verified

26// GetFunction returns the compiled function with the given name and parameters. Returns false if the function could not
27// be found.
28func GetFunction(ctx *sql.Context, functionName string, params ...sql.Expression) (*CompiledFunction, bool, error) {
29 if createFunc, ok := compiledCatalog[functionName]; ok {
30 expr, err := createFunc(ctx, params...)
31 if err != nil {
32 return nil, false, err
33 }
34 return expr.(*CompiledFunction), true, nil
35 }
36 return nil, false, nil
37}
38
39// dummyExpression is a simple expression that exists solely to capture type information for a parameter. This is used
40// exclusively by the getQuickFunctionForTypes function.

Callers 3

ReplaceSerialFunction · 0.92
RowIterMethod · 0.92
getQuickFunctionForTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected