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)
| 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. |
| 90 | func (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. |
| 103 | func (pgf *Collection) HasFunction(ctx context.Context, funcID id.Function) bool { |
no test coverage detected