Skip to content

Commit 4334d2e

Browse files
committed
Fix for uint64 value bigger than 1<<63
1 parent 3050386 commit 4334d2e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

uint64.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ func (u Uint64) Value() (driver.Value, error) {
117117
if !u.Valid {
118118
return nil, nil
119119
}
120+
121+
if u.Uint64 >= 1<<63 {
122+
return strconv.FormatUint(u.Uint64, 10), nil
123+
}
124+
120125
return int64(u.Uint64), nil
121126
}
122127

0 commit comments

Comments
 (0)