-
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
Add Sqlite support for the time crate #1865
Add Sqlite support for the time crate #1865
Conversation
docs(sqlite): Update types module docs for JSON and Chrono docs(mysql): Update types module docs for JSON
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.
Looks awesome ❤️
Proof is in the tests - nice!
All the places where you have a slice of use time::format_description::FormatItem;
// Attempts the formats in order until one successfully parses or all fail.
let formats = FormatItem::First(&[
fd!(...),
...
]);
OffsetDateTime::parse(string, formats) |
I've made changes to use The solution is breaking up the format descriptions into common smaller pieces and using manual composition with other I'm less confident about how I handled the variable naming and composition with slices. |
Converted to a draft after benchmarking my assumptions and found them to be wanting. I'm going to spend some time looking at performance and then present findings and changes |
I've made significant performance improvements over the original change and initial attempt to work with |
Thanks! @johnbcodes for the hard work!! I wonder when will this be released? |
Based on Sqlite support for Chrono and offers similar functionality but is significantly different in the following ways:
DataType::Float
.Additionally, I updated the module documentation for type support omissions in Sqlite and corrected JSON type documentation for Mysql.