MCPcopy
hub / github.com/google/uuid / Scan

Method Scan

null.go:35–49  ·  view source on GitHub ↗

Scan implements the SQL driver.Scanner interface.

(value interface{})

Source from the content-addressed store, hash-verified

33
34// Scan implements the SQL driver.Scanner interface.
35func (nu *NullUUID) Scan(value interface{}) error {
36 if value == nil {
37 nu.UUID, nu.Valid = Nil, false
38 return nil
39 }
40
41 err := nu.UUID.Scan(value)
42 if err != nil {
43 nu.Valid = false
44 return err
45 }
46
47 nu.Valid = true
48 return nil
49}
50
51// Value implements the driver Valuer interface.
52func (nu NullUUID) Value() (driver.Value, error) {

Callers 1

TestNullUUIDScanFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestNullUUIDScanFunction · 0.76