Value converts the KSUID into a SQL driver value which can be used to directly use the KSUID as parameter to a SQL query.
()
| 137 | // Value converts the KSUID into a SQL driver value which can be used to |
| 138 | // directly use the KSUID as parameter to a SQL query. |
| 139 | func (i KSUID) Value() (driver.Value, error) { |
| 140 | if i.IsNil() { |
| 141 | return nil, nil |
| 142 | } |
| 143 | return i.String(), nil |
| 144 | } |
| 145 | |
| 146 | // Scan implements the sql.Scanner interface. It supports converting from |
| 147 | // string, []byte, or nil into a KSUID value. Attempting to convert from |