paul-rouse / mysql-simple

A mid-level client library for the MySQL database, intended to be fast and easy to use.
Other
91 stars 35 forks source link

Parse datetimes/timestamps with fractional seconds. #37

Closed galenhuntington closed 7 years ago

galenhuntington commented 7 years ago

E.g., timestamp(3) returns an error.

paul-rouse commented 7 years ago

I am not against a CPP conditional, if you want to modify your change to use one. I do want to support Stackage 2,X for a while longer, to allow ghc 7.8, but I will consider removing it once ghc 8.2.X is out, and the conditional can be removed at that time.

galenhuntington commented 7 years ago

Well, that was just an aside since I happened to notice the deprecation. The important part is adding the "%Q" to the format so timestamps with fractional seconds don't return parse errors. Everything else can be a separate issue.

paul-rouse commented 7 years ago

Fair enough. I'll merge it as is.