Skip to content
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

Add support for fractional seconds. #270

Closed
wants to merge 3 commits into from
Closed

Add support for fractional seconds. #270

wants to merge 3 commits into from

Conversation

joostdebruijn
Copy link
Contributor

Description

In MySQL 5.6 the support for saving fractional seconds for the DATETIME datatype was added. This pull request will add support for it to the connector.

I'm not sure about the best way to add test coverage for my changes to the current set of tests. If someone can help me with that, I will appreciate that. 😄

Note: MySQL supports a precision up to 6 digits, however this is not supported in JavaScript (it has a maximum of 3 digits). To avoid problems, I capped the maximum precision for the Date-datatype to three. If you agree with this limitation, I will add something in the README about that.

Related issues

#183

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

@slnode
Copy link

slnode commented Apr 25, 2017

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

@slnode
Copy link

slnode commented Apr 25, 2017

Can one of the admins verify this patch?

2 similar comments
@slnode
Copy link

slnode commented Apr 25, 2017

Can one of the admins verify this patch?

@slnode
Copy link

slnode commented Apr 25, 2017

Can one of the admins verify this patch?

@joostdebruijn
Copy link
Contributor Author

joostdebruijn commented Apr 25, 2017

I just realized the maximum precision of three doesn't matter for the connector when creating and maintaining the DATETIME column, so I removed it. When someone needs such precision for other matters without using the JavaScript Date-object, it should be possible.

However, we may want to mention in the README that JavaScript is not able to parse a precision with more than three digits. It will cause data / precision loss when modifying such database entries via this connector.

@joostdebruijn
Copy link
Contributor Author

I noticed that in the last few days a lot of discussion about timezones took place. Some of the proposed changes (e.g. #271) will probably have influence on this pull request and the way fractional seconds could be supported for this connector.

My suggestion is to set this PR on hold until it is clear which of proposed timezone related changes will be merged in to the master. Then I will update this pull request or create a new one.

@joostdebruijn joostdebruijn deleted the feature-fractionalseconds branch May 3, 2017 17:17
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