Support for timestamps with sub second resolution.#281
Open
Alexibu wants to merge 13 commits intomysql-d:masterfrom
Open
Support for timestamps with sub second resolution.#281Alexibu wants to merge 13 commits intomysql-d:masterfrom
Alexibu wants to merge 13 commits intomysql-d:masterfrom
Conversation
Collaborator
|
Thanks. Been super busy will have a look next week or so. |
Author
|
Support for timestamps with sub second precision in results and queries. |
Author
|
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. |
Collaborator
|
The github actions should be running, but aren't I'm going to close and reopen the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.