-
Notifications
You must be signed in to change notification settings - Fork 22
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
datetimeoffset support #48
Conversation
Just checking in: is there anything I can do to help get this merged? We've been running on these patches in my employer's code base for a couple months now and we haven't experienced any issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this LGTM apart from some minor change requests. Can you also update changelog ?
@@ -773,6 +776,43 @@ getData dbc stmt i col = fmap (col, ) $ | |||
(fmap fromIntegral (odbc_TIME_STRUCT_hour datePtr)) <*> | |||
(fmap fromIntegral (odbc_TIME_STRUCT_minute datePtr)) <*> | |||
(fmap fromIntegral (odbc_TIME_STRUCT_second datePtr)))) | |||
| colType == sql_ss_timestampoffset -> | |||
withCallocBytes | |||
20 -- The TIMESTAMPOFFSET_STRUCT contains 3 SQLSMALLINTs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit pick: I would use the #size
(from hsc2hs) macro to compute it ? But free feel to ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that the size constant is not ideal. Since you're OK with it I will leave it as is, rather than introduce hsc2hs.
@psibi thanks for the feedback! Made the updates you requested, except for the hardcoded size. |
Thank you! |
Code is thanks to @ploeh from #25 which I've rebased onto master and fixed the
Hashable
instance.Tests pass. I've also done some testing in my employer's code base and everything seems to work properly. How do we feel about merging this?