-
Notifications
You must be signed in to change notification settings - Fork 20
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
Decimal #193
Decimal #193
Conversation
precision: decimal.precision, | ||
scale: decimal.scale, | ||
precision: decimal.precision as u8, | ||
scale: decimal.scale as i16, |
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.
What about use TryInto/TryFrom, for detect if outranges values as error?
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.
done
@@ -160,6 +174,22 @@ impl TryFrom<crate::Value> for RawTypedValue { | |||
} | |||
} | |||
|
|||
#[repr(C)] | |||
pub(crate) union DecimalUnion { |
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.
It is first usage of unsafe in the SDK.
Is other way for split i128 to u64 parts exists?
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.
I done it without unsafe
Thanks for the PR :) |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
There is no decimal support in the library
Issue Number: N/A
What is the new behavior?
Implemented decimal type
Other information