IsParamFunc fulfills the astutils.Search
(node ast.Node)
| 7 | |
| 8 | // IsParamFunc fulfills the astutils.Search |
| 9 | func IsParamFunc(node ast.Node) bool { |
| 10 | call, ok := node.(*ast.FuncCall) |
| 11 | if !ok { |
| 12 | return false |
| 13 | } |
| 14 | |
| 15 | if call.Func == nil { |
| 16 | return false |
| 17 | } |
| 18 | |
| 19 | isValid := call.Func.Schema == "sqlc" && (call.Func.Name == "arg" || call.Func.Name == "narg" || call.Func.Name == "slice") |
| 20 | return isValid |
| 21 | } |
| 22 | |
| 23 | func IsParamSign(node ast.Node) bool { |
| 24 | expr, ok := node.(*ast.A_Expr) |
no outgoing calls
no test coverage detected