mysql2 icon indicating copy to clipboard operation
mysql2 copied to clipboard

Add precision to time, datetime, and timestamp field types

Open ankane opened this issue 10 months ago • 3 comments

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)

ankane avatar Feb 25 '25 23:02 ankane

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

sodabrew avatar Apr 07 '25 01:04 sodabrew

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

ankane avatar Apr 07 '25 05:04 ankane

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

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

sodabrew avatar Apr 12 '25 00:04 sodabrew