-
Notifications
You must be signed in to change notification settings - Fork 34
Add temporal type to rsmgp-sys #82
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
Conversation
9adf16b to
fc79668
Compare
fc79668 to
c90b42d
Compare
c90b42d to
6dbed22
Compare
gitbuda
left a comment
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.
🚀 🚀
| pub fn month(&self) -> u32 { | ||
| unsafe { | ||
| invoke_mgp_func!(i32, ffi::mgp_local_date_time_get_month, self.ptr).unwrap() as u32 | ||
| } | ||
| } | ||
|
|
||
| pub fn day(&self) -> u32 { | ||
| unsafe { invoke_mgp_func!(i32, ffi::mgp_local_date_time_get_day, self.ptr).unwrap() as u32 } | ||
| } |
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.
Is there a reason for casting all of these types to uint, since mgp calls return int?
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.
Good question! I meant these classes to used only to convert from/to the chrono types, therefore I adjusted the return types of these function to match the types of the chrono types, e.g. the usage in to_naive_date_time.
| Error::UnableToCreateDurationFromChronoDuration | ||
| ); | ||
| }); | ||
| } |
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.
Very extensive tests! 🥇
No description provided.