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

Method CopyFromMySQLFields

internal/codegen/golang/query.go:233–245  ·  view source on GitHub ↗

Deprecated: This method does not respect the Emit field set on the QueryValue. It's used by the go-sql-driver-mysql/copyfromCopy.tmpl and should not be used other places.

()

Source from the content-addressed store, hash-verified

231// QueryValue. It's used by the go-sql-driver-mysql/copyfromCopy.tmpl and should
232// not be used other places.
233func (v QueryValue) CopyFromMySQLFields() []Field {
234 // fmt.Printf("%#v\n", v)
235 if v.Struct != nil {
236 return v.Struct.Fields
237 }
238 return []Field{
239 {
240 Name: v.Name,
241 DBName: v.DBName,
242 Type: v.Typ,
243 },
244 }
245}
246
247func (v QueryValue) VariableForField(f Field) string {
248 if !v.IsStruct() {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected