MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Scan

Method Scan

pkg/util/uuid/sql.go:65–74  ·  view source on GitHub ↗

Scan implements the sql.Scanner interface.

(src interface{})

Source from the content-addressed store, hash-verified

63
64// Scan implements the sql.Scanner interface.
65func (u *NullUUID) Scan(src interface{}) error {
66 if src == nil {
67 u.UUID, u.Valid = Nil, false
68 return nil
69 }
70
71 // Delegate to UUID Scan function
72 u.Valid = true
73 return u.UUID.Scan(src)
74}
75
76// MarshalJSON marshals the NullUUID as null or the nested UUID
77func (u NullUUID) MarshalJSON() ([]byte, error) {

Callers

nothing calls this directly

Calls 1

ScanMethod · 0.45

Tested by

no test coverage detected