MCPcopy Index your code
hub / github.com/jackc/pgx / Scan

Method Scan

pgtype/uuid.go:232–247  ·  view source on GitHub ↗
(src []byte, dst any)

Source from the content-addressed store, hash-verified

230type scanPlanBinaryUUIDToTextScanner struct{}
231
232func (scanPlanBinaryUUIDToTextScanner) Scan(src []byte, dst any) error {
233 scanner := (dst).(TextScanner)
234
235 if src == nil {
236 return scanner.ScanText(Text{})
237 }
238
239 if len(src) != 16 {
240 return fmt.Errorf("invalid length for UUID: %v", len(src))
241 }
242
243 var buf [16]byte
244 copy(buf[:], src)
245
246 return scanner.ScanText(Text{String: encodeUUID(buf), Valid: true})
247}
248
249type scanPlanTextAnyToUUIDScanner struct{}
250

Callers

nothing calls this directly

Calls 2

encodeUUIDFunction · 0.85
ScanTextMethod · 0.65

Tested by

no test coverage detected