Open bronze1man opened 5 months ago
Yes, it violates database/sql convention. But this violation is necessary to support uint64. So we can not fix it until database/sql supports uint64 natively.
@methane Is there any document or examples about how to implement sql.Scanner to work with https://github.com/go-sql-driver/mysql? I do not like try and fail again and again.
There is perfect document.
https://cs.opensource.google/go/go/+/master:src/database/sql/convert.go;l=219-480
It must be readable than my English.
It maybe a bug of database/sql , if it is ,please tell me.
Issue description
https://pkg.go.dev/database/sql#Scanner says Scanner should return one of int64,float64,bool,[]byte,string,time.Time,nil , but I got uint64
Example code
the sql:
some of my scaner_t implement.
Error log
Configuration
Driver version (or git SHA): github.com/go-sql-driver/mysql v1.8.0
Go version: run
go version
in your console go version go1.19.2 darwin/amd64Server version: E.g. MySQL 5.6, MariaDB 10.0.20
Server OS: E.g. Debian 8.1 (Jessie), Windows 10 mac os 14.2.1