(node ast.Node)
| 17 | } |
| 18 | |
| 19 | func (v *funcCallVisitor) Visit(node ast.Node) astutils.Visitor { |
| 20 | if v.err != nil { |
| 21 | return nil |
| 22 | } |
| 23 | |
| 24 | call, ok := node.(*ast.FuncCall) |
| 25 | if !ok { |
| 26 | return v |
| 27 | } |
| 28 | fn := call.Func |
| 29 | if fn == nil { |
| 30 | return v |
| 31 | } |
| 32 | |
| 33 | if fn.Schema == "sqlc" { |
| 34 | return nil |
| 35 | } |
| 36 | |
| 37 | fun, err := v.catalog.ResolveFuncCall(call) |
| 38 | if fun != nil { |
| 39 | return v |
| 40 | } |
| 41 | if errors.Is(err, sqlerr.NotFound) && !v.settings.Package.StrictFunctionChecks { |
| 42 | return v |
| 43 | } |
| 44 | v.err = err |
| 45 | return nil |
| 46 | } |
| 47 | |
| 48 | func FuncCall(c *catalog.Catalog, cs config.CombinedSettings, n ast.Node) error { |
| 49 | visitor := funcCallVisitor{catalog: c, settings: cs} |
nothing calls this directly
no test coverage detected