-
-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Description
When I try to use a custom type in null.Value[T], I get the following error trying to write to the database:
"sql: converting argument $4 type: non-Value type date.Date returned from Value"
I think this is because sql.Null says it only supports types supported by driver.Value, and driver.Value says it only supports these types. Specifically, sql.Null[T] does not call T.Value(), so the only types that can be used currently in null.Value[T] are those directly supported by driver.Value.
If null.Value[T] had a Value() (driver.Value, error) method that delegated to T.Value(), then I think it would work to use any type in null.Value.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels