Skip to content

Add precision to time, datetime, and timestamp field types #1394

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ankane
Copy link

@ankane ankane commented Feb 25, 2025

This updates Result#field_types to return the precision for time, datetime, and timestamp fields (like other types).

https://dev.mysql.com/doc/refman/8.4/en/fractional-seconds.html

Edit: Updated to only add the precision if not the default (for slightly more backwards compatibility)

@sodabrew
Copy link
Collaborator

sodabrew commented Apr 7, 2025

I like this, but would need to put it into a major-ish release

@sodabrew sodabrew added this to the 0.6.0 milestone Apr 7, 2025
@ankane
Copy link
Author

ankane commented Apr 7, 2025

Makes sense. I think it should probably always include the precision in that case.

@ankane ankane force-pushed the field-types-precision branch from 2e843cb to 52b7b58 Compare April 12, 2025 00:23
@sodabrew
Copy link
Collaborator

Makes sense. I think it should probably always include the precision in that case.

Off the cuff, yes, ish? I think so.

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