Skip to content
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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Alexibu
Copy link

@Alexibu Alexibu commented Dec 22, 2023

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.

@schveiguy
Copy link
Collaborator

Thanks. Been super busy will have a look next week or so.

@Alexibu
Copy link
Author

Alexibu commented Dec 28, 2023

Support for timestamps with sub second precision in results and queries.

@Alexibu
Copy link
Author

Alexibu commented Dec 29, 2023

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.

@schveiguy
Copy link
Collaborator

The github actions should be running, but aren't I'm going to close and reopen the PR.

@schveiguy schveiguy closed this Dec 29, 2023
@schveiguy schveiguy reopened this Dec 29, 2023
@Alexibu Alexibu changed the title Mod to consume all bytes from a timestamp with sub second resolution. Support for timestamps with sub second resolution. Jan 10, 2024
@Alexibu Alexibu closed this Jan 10, 2024
@Alexibu Alexibu reopened this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants