MCPcopy
hub / github.com/sqlc-dev/sqlc / isNamedParamSignCast

Function isNamedParamSignCast

internal/sql/rewrite/parameters.go:36–43  ·  view source on GitHub ↗
(node ast.Node)

Source from the content-addressed store, hash-verified

34}
35
36func isNamedParamSignCast(node ast.Node) bool {
37 expr, ok := node.(*ast.A_Expr)
38 if !ok {
39 return false
40 }
41 _, cast := expr.Rexpr.(*ast.TypeCast)
42 return astutils.Join(expr.Name, ".") == "@" && cast
43}
44
45// paramFromFuncCall creates a param from sqlc.n?arg() calls return the
46// parameter and whether the parameter name was specified a best guess as its

Callers 1

NamedParametersFunction · 0.85

Calls 1

JoinFunction · 0.92

Tested by

no test coverage detected