The MySQL data type conversion failed when requesting a NULL value.
This was because one can request the desired type from mysql_common library as a generic parameter, and it considers MySQL NULL types to be convertible only when the requested type is Option<T>.
Confusingly, the outer Option seems to signify whether the value is taken from the Row, it has no connection to the nullability of the type.
Additions
Added MySQL datatypes for numeric types
Added MySQL datatypes for date/time types
These additions might need to be reviewed carefully, since I'm not exactly sure whether the types match for what's intended for the rdbc::DataType type. (Ref: https://github.com/andygrove/rdbc/issues/42 )
Chores
format!("{:?}", e) -> e.to_string(), seems to be simpler and avoids the format machinery where it's not needed.
Bugfix
mysql_common
library as a generic parameter, and it considers MySQL NULL types to be convertible only when the requested type isOption<T>
.Option
seems to signify whether the value istaken
from theRow
, it has no connection to the nullability of the type.Additions
rdbc::DataType
type. (Ref: https://github.com/andygrove/rdbc/issues/42 )Chores
format!("{:?}", e)
->e.to_string()
, seems to be simpler and avoids the format machinery where it's not needed.