Value implements the driver.Valuer interface.
()
| 73 | |
| 74 | // Value implements the driver.Valuer interface. |
| 75 | func (u NullUUID) Value() (driver.Value, error) { |
| 76 | if !u.Valid { |
| 77 | return nil, nil |
| 78 | } |
| 79 | // Delegate to UUID Value function |
| 80 | return u.UUID.Value() |
| 81 | } |
| 82 | |
| 83 | // Scan implements the sql.Scanner interface. |
| 84 | func (u *NullUUID) Scan(src interface{}) error { |