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

Function findParameters

internal/compiler/find_params.go:10–20  ·  view source on GitHub ↗
(root ast.Node)

Source from the content-addressed store, hash-verified

8)
9
10func findParameters(root ast.Node) ([]paramRef, []error) {
11 refs := make([]paramRef, 0)
12 errors := make([]error, 0)
13 v := paramSearch{seen: make(map[int]struct{}), refs: &refs, errs: &errors}
14 astutils.Walk(v, root)
15 if len(*v.errs) > 0 {
16 return refs, *v.errs
17 } else {
18 return refs, nil
19 }
20}
21
22type paramRef struct {
23 parent ast.Node

Callers 1

_analyzeQueryMethod · 0.85

Calls 1

WalkFunction · 0.92

Tested by

no test coverage detected