Value implements the driver Valuer interface.
()
| 50 | |
| 51 | // Value implements the driver Valuer interface. |
| 52 | func (nu NullUUID) Value() (driver.Value, error) { |
| 53 | if !nu.Valid { |
| 54 | return nil, nil |
| 55 | } |
| 56 | // Delegate to UUID Value function |
| 57 | return nu.UUID.Value() |
| 58 | } |
| 59 | |
| 60 | // MarshalBinary implements encoding.BinaryMarshaler. |
| 61 | func (nu NullUUID) MarshalBinary() ([]byte, error) { |
no outgoing calls