-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support for timestamps with sub second resolution. #281
base: master
Are you sure you want to change the base?
Conversation
Thanks. Been super busy will have a look next week or so. |
Support for timestamps with sub second precision in results and queries. |
This branch now deals with timestamp(3) data. The sub second values are microseconds stored in an optional 32 bit int after the rest of the datetime fields. I created a new type DateTimeExt to hold the microseconds. An alternative design would be to convert to using SysTime which has the necessary resolution, but also handles the timezone which would require a significant change to how the API works. |
The github actions should be running, but aren't I'm going to close and reopen the PR. |
In Mariadb you can specify that a timestamp has finer than second resolution e.g. TIMESTAMP(3), this results in an extra 4 bytes in the timestamp packet.
datetime.DateTime only supports second resolution, so we can't do anything with them but they need to be consumed for the next value to be read correctly.