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

Function flatten

internal/sql/rewrite/parameters.go:15–19  ·  view source on GitHub ↗

Given an AST node, return the string representation of names

(root ast.Node)

Source from the content-addressed store, hash-verified

13
14// Given an AST node, return the string representation of names
15func flatten(root ast.Node) (string, bool) {
16 sw := &stringWalker{}
17 astutils.Walk(sw, root)
18 return sw.String, sw.IsConst
19}
20
21type stringWalker struct {
22 String string

Callers 3

EmbedsFunction · 0.85
paramFromFuncCallFunction · 0.85
NamedParametersFunction · 0.85

Calls 1

WalkFunction · 0.92

Tested by

no test coverage detected