Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix MySQL NULL and add numeric & date/time datatypes. #44

Merged
merged 1 commit into from
Dec 27, 2019

Conversation

golddranks
Copy link
Contributor

Bugfix

  • 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: Datatype for 64-bit integers (long long)? #42 )

Chores

  • format!("{:?}", e) -> e.to_string(), seems to be simpler and avoids the format machinery where it's not needed.

Copy link
Contributor

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andygrove andygrove merged commit e1904f2 into tokio-rs:master Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants