Skip to content

Regarding: TIME (could be mapped to Date, but what date would be set?) #1051

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

Closed
krnlde opened this issue Apr 7, 2015 · 8 comments
Closed
Assignees
Labels

Comments

@krnlde
Copy link

krnlde commented Apr 7, 2015

You could represent them as durations like in: http://momentjs.com/docs/#/durations/creating/

@dougwilson
Copy link
Member

Assuming we want to even add a dependency on moment, which we don't. We provide a framework so you can easily covert TIME columns to moment objects if you desire that.

@krnlde
Copy link
Author

krnlde commented Apr 8, 2015

The format moment uses is a standard. You don't actually have to have moment for that. But the description there was thorough.

@dougwilson
Copy link
Member

Well, I'm not sure what we would be doing if not actually using moment? Anything as a string is just what your own MySQL server sends back to us...

@krnlde
Copy link
Author

krnlde commented Apr 8, 2015

Yep.

@dougwilson
Copy link
Member

Ok. That's what already happens. I'm going to close this question since I'm not sure what it really is. Please feel free to elaborate if there is still something to do here.

@dougwilson dougwilson self-assigned this Apr 8, 2015
@krnlde
Copy link
Author

krnlde commented Apr 8, 2015

Not really an issue. It was more meant to be a suggestion for further consideration.

Edit: http://en.wikipedia.org/wiki/ISO_8601#Durations

@dougwilson
Copy link
Member

Right, but we don't do anything; it's just what your server sends back as the TIME format. If you change your MySQL server's response to be in that format, then it'll be like that in your queries here. We are a low-level library that tries not to touch whatever is coming back from your server. There really isn't anything for us to consider here, since we don't control the MySQL server source :)

@krnlde
Copy link
Author

krnlde commented Apr 8, 2015

True. I just answered the question in the readme.md :)

dveeden pushed a commit to dveeden/mysql that referenced this issue Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants