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
It appears that sql.Valuer is only implemented for String and FixedString. String and FixedString also only check for the returned value from sql.Valuer.Value() call is a string instead of rechecking the supported types in the preceding logic.
Steps to reproduce
Wrap any type such as Float64 in valuer supported type such as this Option generic type that implements the sql.Valuer type.
Attempt to insert a record into the database.
Error occurs about unsupported type.
Expected behaviour
The code to detect sql.Valuer, just like the code does for sql.Scanner when reading data out, to put data in.
An enhancement for those types that did not have it before, but a bug fix for String and FixedString because the returned values after sql.Valuer.Value() were not re-evaluated through the type checks again and assumed return value was either a string or error.
Describe the bug
It appears that
sql.Valuer
is only implemented forString
andFixedString
.String
andFixedString
also only check for the returned value fromsql.Valuer.Value()
call is a string instead of rechecking the supported types in the preceding logic.Steps to reproduce
sql.Valuer
type.Expected behaviour
The code to detect
sql.Valuer
, just like the code does forsql.Scanner
when reading data out, to put data in.Code example
Error log
Configuration
Environment
ClickHouse server
The text was updated successfully, but these errors were encountered: