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

Function IsParamFunc

internal/sql/named/is.go:9–21  ·  view source on GitHub ↗

IsParamFunc fulfills the astutils.Search

(node ast.Node)

Source from the content-addressed store, hash-verified

7
8// IsParamFunc fulfills the astutils.Search
9func 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
23func IsParamSign(node ast.Node) bool {
24 expr, ok := node.(*ast.A_Expr)

Callers 2

NamedParametersFunction · 0.92
validateCopyfromFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected