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

Function checkIncompatibleFieldTypes

internal/codegen/golang/result.go:456–466  ·  view source on GitHub ↗
(fields []Field)

Source from the content-addressed store, hash-verified

454}
455
456func checkIncompatibleFieldTypes(fields []Field) error {
457 fieldTypes := map[string]string{}
458 for _, field := range fields {
459 if fieldType, found := fieldTypes[field.Name]; !found {
460 fieldTypes[field.Name] = field.Type
461 } else if field.Type != fieldType {
462 return fmt.Errorf("named param %s has incompatible types: %s, %s", field.Name, field.Type, fieldType)
463 }
464 }
465 return nil
466}

Callers 1

columnsToStructFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected