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
// Value is a value that drivers must be able to handle.
// It is either nil or an instance of one of these types:
//
// int64
// float64
// bool
// []byte
// string [*] everywhere except from Rows.Next.
// time.Time
// The dest slice may be populated only with
// a driver Value type, but excluding string.
// All string values must be converted to []byte.
But in sql.convertAssign which is called by sql.Rows.Scan, it actually handles values of pretty much every type depending on the type the value is being scanned into.
According to the spec, this fix for the go-sql-driver/mysql driver shouldn't work, but it does: go-sql-driver/mysql#434
It seems like the docs should be updated to reflect the actual behavior, or at least include all the types which are handled by asString and asBytes for values which are allowed to be returned from driver.Rows.Scan implementations.
The text was updated successfully, but these errors were encountered:
src/database/sql/driver/driver.go says
and then in the driver.Rows.Scan spec it says:
But in sql.convertAssign which is called by sql.Rows.Scan, it actually handles values of pretty much every type depending on the type the value is being scanned into.
According to the spec, this fix for the go-sql-driver/mysql driver shouldn't work, but it does: go-sql-driver/mysql#434
It seems like the docs should be updated to reflect the actual behavior, or at least include all the types which are handled by asString and asBytes for values which are allowed to be returned from driver.Rows.Scan implementations.
The text was updated successfully, but these errors were encountered: