We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5448622 commit 13e95a1Copy full SHA for 13e95a1
sql/yeartype.go
@@ -113,10 +113,10 @@ func (t yearType) Convert(v interface{}) (interface{}, error) {
113
case float32:
114
return t.Convert(int64(value))
115
case float64:
116
- if value < float64(math.MinInt64) || value > float64(math.MaxInt64) {
117
- return nil, ErrConvertingToYear.New("float64 value out of bounds for int64")
+ if value < float64(math.MinInt16) || value > float64(math.MaxInt16) {
+ return nil, ErrConvertingToYear.New("float64 value out of bounds for int16")
118
}
119
- return t.Convert(int64(value))
+ return t.Convert(int16(value))
120
case decimal.Decimal:
121
return t.Convert(value.IntPart())
122
case decimal.NullDecimal:
0 commit comments