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

Method Replace

internal/sql/astutils/rewrite.go:106–112  ·  view source on GitHub ↗

Replace replaces the current Node with n. The replacement node is not walked by Apply.

(n ast.Node)

Source from the content-addressed store, hash-verified

104// Replace replaces the current Node with n.
105// The replacement node is not walked by Apply.
106func (c *Cursor) Replace(n ast.Node) {
107 v := c.field()
108 if i := c.Index(); i >= 0 {
109 v = v.Index(i)
110 }
111 v.Set(reflect.ValueOf(n))
112}
113
114// D// application carries all the shared data so we can pass it around cheaply.
115type application struct {

Callers 2

EmbedsFunction · 0.45
NamedParametersFunction · 0.45

Calls 2

fieldMethod · 0.95
IndexMethod · 0.95

Tested by

no test coverage detected