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

Method Scan

array.go:508–520  ·  view source on GitHub ↗

Scan implements the sql.Scanner interface.

(src any)

Source from the content-addressed store, hash-verified

506
507// Scan implements the sql.Scanner interface.
508func (a *Int64Array) Scan(src any) error {
509 switch src := src.(type) {
510 case []byte:
511 return a.scanBytes(src)
512 case string:
513 return a.scanBytes([]byte(src))
514 case nil:
515 *a = nil
516 return nil
517 }
518
519 return fmt.Errorf("pq: cannot convert %T to Int64Array", src)
520}
521
522func (a *Int64Array) scanBytes(src []byte) error {
523 elems, err := scanLinearArray(src, []byte{','}, "Int64Array")

Callers

nothing calls this directly

Calls 1

scanBytesMethod · 0.95

Tested by

no test coverage detected