MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / GetFunc

Method GetFunc

internal/compiler/query_catalog.go:96–109  ·  view source on GitHub ↗
(rel *ast.FuncName)

Source from the content-addressed store, hash-verified

94}
95
96func (qc QueryCatalog) GetFunc(rel *ast.FuncName) (*Function, error) {
97 funcs, err := qc.catalog.ListFuncsByName(rel)
98 if err != nil {
99 return nil, err
100 }
101 if len(funcs) == 0 {
102 return nil, fmt.Errorf("function not found: %s", rel.Name)
103 }
104 return &Function{
105 Rel: rel,
106 Outs: funcs[0].OutArgs(),
107 ReturnType: funcs[0].ReturnType,
108 }, nil
109}

Callers 1

sourceTablesMethod · 0.80

Calls 2

ListFuncsByNameMethod · 0.80
OutArgsMethod · 0.80

Tested by

no test coverage detected