// Value implements the database/sql/driver Valuer interface. Nil is a valid
// type to be stored in a driver.Value, but uint8 isn't, so if this Uint8 is
// valid it will cast its uint8 to an int64.
Value implements the database/sql/driver Valuer interface. Nil is a valid
type to be stored in a driver.Value, but uint8 isn't, so if this Uint8 is
valid it will cast its uint8 to an int64.
// Value implements the database / sql / driver Valuer interface . Nil is a valid // type to be stored in a driver . Value but uint8 isn ' t so if this Uint8 is // valid it will cast its uint8 to an int64 .
func (i Uint8) Value() (driver.Value, error) {
	if !i.Valid {
		return nil, nil
	}
	return int64(i.Uint8), nil
}
func ( i Uint8 ) Value ( ) ( driver . Value , error ) { if ! i . Valid { return nil , nil } return int64 ( i . Uint8 ) , nil }
Value implements the database/sql/driver Valuer interface.
Value implements the database / sql / driver Valuer interface .