Closed yflau closed 2 months ago
Can you test with v1.9.0 please ?
@samber I just tried with both the v1.9.0 and the v1.11.0, both of them have the same issue.
Similar issue here as well. We are about to fork this repository and make use of the sql.convertAssign
function.
-> v1.13.0
For example
CREATE TABLE
t(
optionalVARCHAR(64));
then will got
Failed scanning row: sql: Scan error on column index 1, name "optional": failed to scan Option[T]
, and the reason is that type of argsrc
of Scan is []uint8, and failed here when assert type isstring
, refer to sql.NullString, we can use the functionsql.convertAssign
to replace thedriver.DefaultParameterConverter.ConvertValue
to resolve it, but the convertAssign is private, and maybe won't be public(refer to https://github.com/golang/go/issues/24258), so we can copy out the convertAssign and make some modification or write a new convert function? what do you think? Or have some other solution?