Find a matching embed by column ref
(node *ast.ColumnRef)
| 24 | |
| 25 | // Find a matching embed by column ref |
| 26 | func (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 |
no outgoing calls
no test coverage detected