MCPcopy Create free account
hub / github.com/lib/pq / Scan

Method Scan

array.go:226–238  ·  view source on GitHub ↗

Scan implements the sql.Scanner interface.

(src any)

Source from the content-addressed store, hash-verified

224
225// Scan implements the sql.Scanner interface.
226func (a *Float64Array) Scan(src any) error {
227 switch src := src.(type) {
228 case []byte:
229 return a.scanBytes(src)
230 case string:
231 return a.scanBytes([]byte(src))
232 case nil:
233 *a = nil
234 return nil
235 }
236
237 return fmt.Errorf("pq: cannot convert %T to Float64Array", src)
238}
239
240func (a *Float64Array) scanBytes(src []byte) error {
241 elems, err := scanLinearArray(src, []byte{','}, "Float64Array")

Callers

nothing calls this directly

Calls 1

scanBytesMethod · 0.95

Tested by

no test coverage detected