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
We are trying to use sql.Null[uint64]{}. While it works for mysql database the check fails for sqlMock, because it uses default converter that is not aware of uint64.
Issue description
We are trying to use sql.Null[uint64]{}. While it works for mysql database the check fails for sqlMock, because it uses default converter that is not aware of uint64.
sqlMock uses DefaultParameterConverter and it fails with uint64.
https://github.com/DATA-DOG/go-sqlmock/blob/master/sqlmock.go#L112-L114
Now DefaultParameterConverter is public from go/sql package.
https://github.com/golang/go/blob/master/src/database/sql/driver/types.go#L213C2-L213C47
However sqlmock supports providing different parameter converter.
https://github.com/DATA-DOG/go-sqlmock/blob/master/options.go#L10-L15
Basically if you are willing to expose it as MysqlParameterConverter:
https://github.com/go-sql-driver/mysql/blob/master/statement.go#L135
Example code
Error log
Configuration
Driver version (or git SHA): 1.8.1
Go version: 1.23.2
Server version: MySQL 8.0, sqlmock 1.5.2
Server OS: MacOSX
The text was updated successfully, but these errors were encountered: