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

Method scanBytes

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

Source from the content-addressed store, hash-verified

889}
890
891func (a *Int64Array) scanBytes(src []byte) error {
892 elems, err := scanLinearArray(src, []byte{','}, "Int64Array")
893 if err != nil {
894 return err
895 }
896 if *a != nil && len(elems) == 0 {
897 *a = (*a)[:0]
898 } else {
899 b := make(Int64Array, len(elems))
900 for i, v := range elems {
901 if b[i], err = strconv.ParseInt(string(v), 10, 64); err != nil {
902 return fmt.Errorf("boil: parsing array element index %d: %v", i, err)
903 }
904 }
905 *a = b
906 }
907 return nil
908}
909
910// Value implements the driver.Valuer interface.
911func (a Int64Array) Value() (driver.Value, error) {

Callers 1

ScanMethod · 0.95

Calls 1

scanLinearArrayFunction · 0.85

Tested by

no test coverage detected