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

Function checkNoTimesForMySQLCopyFrom

internal/codegen/golang/gen.go:356–368  ·  view source on GitHub ↗
(queries []Query)

Source from the content-addressed store, hash-verified

354}
355
356func checkNoTimesForMySQLCopyFrom(queries []Query) error {
357 for _, q := range queries {
358 if q.Cmd != metadata.CmdCopyFrom {
359 continue
360 }
361 for _, f := range q.Arg.CopyFromMySQLFields() {
362 if f.Type == "time.Time" {
363 return fmt.Errorf("values with a timezone are not yet supported")
364 }
365 }
366 }
367 return nil
368}
369
370func filterUnusedStructs(enums []Enum, structs []Struct, queries []Query) ([]Enum, []Struct) {
371 keepTypes := make(map[string]struct{})

Callers 1

generateFunction · 0.85

Calls 1

CopyFromMySQLFieldsMethod · 0.80

Tested by

no test coverage detected