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

Method GetFunctionOverloads

core/functions/collection.go:90–100  ·  view source on GitHub ↗

GetFunctionOverloads returns the overloads for the function matching the schema and the function name. The parameter types are ignored when searching for overloads.

(ctx context.Context, funcID id.Function)

Source from the content-addressed store, hash-verified

88// GetFunctionOverloads returns the overloads for the function matching the schema and the function name. The parameter
89// types are ignored when searching for overloads.
90func (pgf *Collection) GetFunctionOverloads(ctx context.Context, funcID id.Function) ([]Function, error) {
91 overloads, ok := pgf.overloadCache[id.NewFunction(funcID.SchemaName(), funcID.FunctionName())]
92 if !ok || len(overloads) == 0 {
93 return nil, nil
94 }
95 funcs := make([]Function, len(overloads))
96 for i, overload := range overloads {
97 funcs[i] = pgf.accessCache[overload]
98 }
99 return funcs, nil
100}
101
102// HasFunction returns whether the function is present.
103func (pgf *Collection) HasFunction(ctx context.Context, funcID id.Function) bool {

Callers 2

FunctionMethod · 0.80
dropFunctionFunction · 0.80

Calls 3

NewFunctionFunction · 0.92
SchemaNameMethod · 0.45
FunctionNameMethod · 0.45

Tested by

no test coverage detected