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

Method VariableForField

internal/codegen/golang/query.go:247–255  ·  view source on GitHub ↗
(f Field)

Source from the content-addressed store, hash-verified

245}
246
247func (v QueryValue) VariableForField(f Field) string {
248 if !v.IsStruct() {
249 return v.Name
250 }
251 if !v.EmitStruct() {
252 return toLowerCase(f.Name)
253 }
254 return v.Name + "." + f.Name
255}
256
257// A struct used to generate methods and fields on the Queries struct
258type Query struct {

Callers 1

ParamsMethod · 0.95

Calls 3

IsStructMethod · 0.95
EmitStructMethod · 0.95
toLowerCaseFunction · 0.85

Tested by

no test coverage detected