MCPcopy Index your code
hub / github.com/lib/pq / Scan

Method Scan

array.go:570–582  ·  view source on GitHub ↗

Scan implements the sql.Scanner interface.

(src any)

Source from the content-addressed store, hash-verified

568
569// Scan implements the sql.Scanner interface.
570func (a *Int32Array) Scan(src any) error {
571 switch src := src.(type) {
572 case []byte:
573 return a.scanBytes(src)
574 case string:
575 return a.scanBytes([]byte(src))
576 case nil:
577 *a = nil
578 return nil
579 }
580
581 return fmt.Errorf("pq: cannot convert %T to Int32Array", src)
582}
583
584func (a *Int32Array) scanBytes(src []byte) error {
585 elems, err := scanLinearArray(src, []byte{','}, "Int32Array")

Callers

nothing calls this directly

Calls 1

scanBytesMethod · 0.95

Tested by

no test coverage detected