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

Method Find

internal/sql/rewrite/embeds.go:26–33  ·  view source on GitHub ↗

Find a matching embed by column ref

(node *ast.ColumnRef)

Source from the content-addressed store, hash-verified

24
25// Find a matching embed by column ref
26func (es EmbedSet) Find(node *ast.ColumnRef) (*Embed, bool) {
27 for _, e := range es {
28 if e.Node == node {
29 return e, true
30 }
31 }
32 return nil, false
33}
34
35// Embeds rewrites `sqlc.embed(param)` to a `ast.ColumnRef` of form `param.*`.
36// The compiler can make use of the returned `EmbedSet` while expanding the

Callers 2

outputColumnsMethod · 0.45
expandStmtMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected