MCPcopy Index your code
hub / github.com/aarondl/sqlboiler / scanBytes

Method scanBytes

types/array.go:593–611  ·  view source on GitHub ↗
(src []byte)

Source from the content-addressed store, hash-verified

591}
592
593func (a *BytesArray) scanBytes(src []byte) error {
594 elems, err := scanLinearArray(src, []byte{','}, "BytesArray")
595 if err != nil {
596 return err
597 }
598 if *a != nil && len(elems) == 0 {
599 *a = (*a)[:0]
600 } else {
601 b := make(BytesArray, len(elems))
602 for i, v := range elems {
603 b[i], err = parseBytea(v)
604 if err != nil {
605 return fmt.Errorf("could not parse bytea array index %d: %s", i, err.Error())
606 }
607 }
608 *a = b
609 }
610 return nil
611}
612
613// Value implements the driver.Valuer interface. It uses the "hex" format which
614// is only supported on PostgreSQL 9.0 or newer.

Callers 1

ScanMethod · 0.95

Calls 3

scanLinearArrayFunction · 0.85
parseByteaFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected