-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implement DECIMAL
type support for mysql
#234
Implement DECIMAL
type support for mysql
#234
Conversation
Please add integration tests to |
Ok(BigDecimal::new(r, scale.unwrap_or(0))) | ||
} | ||
MySqlData::Text(_) => Err(Error::Decode( | ||
"`BigDecimal` can only be decoded from the binary protocol".into(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to figure this out unless this is a MySQL limitation. It should probably just be like BigDecimal::from_str
I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text format is supported now, and I simplify the Encode/Decode implementation.
General framework of this looks fine. We do want to support both text and binary formats. Assigning @abonander to review the details when he gets a chance as he did the big decimal stuff for postgres. |
@xiaopengli89 Sorry for not pointing this out but you'll need to add the |
Thanks for the work on this. 😄 |
Implement
DECIMAL
type support for mysql.Close #202