You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In convertAssign, we check for numbers but not strings. If this is intentional it should documented why, otherwise consider adding checks for string types.
The text was updated successfully, but these errors were encountered:
I think we should add these checks to the default converter for consistency. The code is small and aligns well with the rest of the driver.IsValid checks.
User defined numeric types such as "type Int int64" have
been able to be scanned into without a custom scanner by
using the reflect scan code path used to convert between
various numeric types. Add in a path for string types
for symmetry and least surprise.
Fixesgolang#18101
Change-Id: I00553bcf021ffe6d95047eca0067ee94b54ff501
Reviewed-on: https://go-review.googlesource.com/39031
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
See #15174 (comment)
In convertAssign, we check for numbers but not strings. If this is intentional it should documented why, otherwise consider adding checks for string types.
The text was updated successfully, but these errors were encountered: