Compare commits

...

2 commits

Author SHA1 Message Date
Lanre Ade
b3818e7f64
Merge a3267013b7 into 0e69d5cd53 2024-04-05 15:58:46 +00:00
Lanre Ade
a3267013b7 Update decimal.go 2019-03-03 16:41:08 -07:00

View file

@ -1819,6 +1819,11 @@ func (d Decimal) MarshalBinary() (data []byte, err error) {
// Scan implements the sql.Scanner interface for database deserialization.
func (d *Decimal) Scan(value interface{}) error {
if value == nil {
d = nil
return nil
}
// first try to see if the data is stored in database as a Numeric datatype
switch v := value.(type) {