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

Method Scan

array.go:289–301  ·  view source on GitHub ↗

Scan implements the sql.Scanner interface.

(src any)

Source from the content-addressed store, hash-verified

287
288// Scan implements the sql.Scanner interface.
289func (a *Float32Array) Scan(src any) error {
290 switch src := src.(type) {
291 case []byte:
292 return a.scanBytes(src)
293 case string:
294 return a.scanBytes([]byte(src))
295 case nil:
296 *a = nil
297 return nil
298 }
299
300 return fmt.Errorf("pq: cannot convert %T to Float32Array", src)
301}
302
303func (a *Float32Array) scanBytes(src []byte) error {
304 elems, err := scanLinearArray(src, []byte{','}, "Float32Array")

Callers

nothing calls this directly

Calls 1

scanBytesMethod · 0.95

Tested by

no test coverage detected