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

Method ListFuncsByName

internal/sql/catalog/public.go:18–33  ·  view source on GitHub ↗
(rel *ast.FuncName)

Source from the content-addressed store, hash-verified

16}
17
18func (c *Catalog) ListFuncsByName(rel *ast.FuncName) ([]Function, error) {
19 var funcs []Function
20 lowered := strings.ToLower(rel.Name)
21 for _, ns := range c.schemasToSearch(rel.Schema) {
22 s, err := c.getSchema(ns)
23 if err != nil {
24 return nil, err
25 }
26 for i := range s.Funcs {
27 if strings.ToLower(s.Funcs[i].Name) == lowered {
28 funcs = append(funcs, *s.Funcs[i])
29 }
30 }
31 }
32 return funcs, nil
33}
34
35func (c *Catalog) ResolveFuncCall(call *ast.FuncCall) (*Function, error) {
36 // Do not validate unknown functions

Callers 2

ResolveFuncCallMethod · 0.95
GetFuncMethod · 0.80

Calls 2

schemasToSearchMethod · 0.95
getSchemaMethod · 0.95

Tested by

no test coverage detected