You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since around the end of 2011, both MySql and MariaDB support (optional) microsecond precision on timestamps.
However, mysql-simple currently raises an exception if faced with such values. Here I propose a way to address this. My main doubt is of course the conversion of TimeOfDay. I guess you choosen (in the original code) to use attoparsec for speed reasons, but my parsec-foo is not so great, and the solution proposed does parse this values correctly. However, a better (faster!) approach would be nice :)
The text was updated successfully, but these errors were encountered:
Can we merge this solution? I'll add my own doubts: this probably should somehow check if MySQL version is new enough, or queries will fail on old versions. I can't test, however, and maybe old MySQL just ignores the fractional part, which is the best situation. If not, I think there is nothing better than a CPP #ifdef for now.
Regarding using of parseTime instead of attoparsec -- is this acceptable? If not, I can try to make an attoparsec version.
Hi,
Since around the end of 2011, both MySql and MariaDB support (optional) microsecond precision on timestamps.
However, mysql-simple currently raises an exception if faced with such values.
Here I propose a way to address this. My main doubt is of course the conversion of TimeOfDay. I guess you choosen (in the original code) to use attoparsec for speed reasons, but my parsec-foo is not so great, and the solution proposed does parse this values correctly. However, a better (faster!) approach would be nice :)
The text was updated successfully, but these errors were encountered: