Cast implementation is not safe
mihaibudiu opened this issue · comments
Mihai Budiu commented
In particular, some casts may fail (e.g., long to int), and these need probably return null in such cases.
It looks like for every SQL type pair we need to handle 4 cases explicitly:
- T to S
- Option<T> to S
- Option<T> to Option<S>
- T to Option<S>