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
Support SQL Server 2008 Datatypes #244
Comments
Linked adapter issue - rails-sqlserver/activerecord-sqlserver-adapter#401 |
@saurabh500 After you have time to see that commit in FreeTDS master, will we be able to use the binary data returned across the wire in FreeTDS 0.95 or will we have to use 0.99 and the new stuff Freddy is doing? TIA |
I pushed some changes to master to integrate dbanydatecrack. This function use new DBDATEREC2 type which change milliseconds to nanoseconds in the DBDATEREC structure and accepts an additional type parameter (which can be returned by dbcoltype) for the type. Could you try if works for you? I extended a test and is actually working. |
Thanks! I just setup our build scripts to allow 0.99 and/or FreeTDS at GitHub's master branch. The GitHub download and build fails tho. I suspect something on my end. However, I can build freetds-dev.0.99.469 on the FTP site. When will master update the dev 0.99 version? If tomorrow, I can do it then but I think I need the FTP version updated. |
OK, freetds-dev.0.99.470 had a this first commit from a few days ago. But still waiting for a few others to show up in the next dev build. Will play with this tomorrow if 471 comes out. Freddy, I assume those are automated? |
Yes. At 9 utc if I remember
|
They are already in the last snapshot. Frediano 2015-11-23 20:03 GMT+00:00 Ken Collins notifications@github.com:
|
@saurabh500 ☝️ |
@freddy77 So far everything looks great. However, the |
Well... this field was never implemented by nobody actually... Microsoft does not define it and Sybase does not use! |
And what value should have if not a datetimeoffset ?? 0 ?? |
@freddy77 Perhaps @saurabh500 can help us here? The only thing I know is that the Microsoft [datetimeoffset] documentation mentions that the zone offset range is -14:00 through +14:00. So if that were minutes, I guess if the MS structure returned anything for Saurabh, any thoughts? |
What waste of bits :-)
|
LOL
Maybe 0 |
@metaskills -14:00 thru +14:00 sounds good. |
@freddy77 and @metaskills My understanding is the FreeTDS will return the coltype for the data types being supported in this issue. If it is any of the 2008 types, then TinyTDS will call dbconvert(...) to get the bytes from FreeTDS parser. FreeTDS will return the a copy of the bytes from the TDS stream and TinyTDS will attempt to create the correct datatype from these bytes? Hence this will allow a separation of concerns where FreeTDS will handle the stream of bytes and the logical data structure will be handled by TinyTDS. Let me know if I got this correct. |
@saurabh500 Correct till that point. I made the decision awhile back ago that I would wait till FreeTDS supported these types rather than using convert since that would result in loss of precisions and info for some types. That's OK tho, @freddy77 has added these new types - notably the struct used with the DBLIB extensions Just waiting on Freddy to get that zone info in. Once that is done, he has said that he will apply the work for these 2008 types into FreeTDS 0.95. |
I think you refer to this for datetimeoffset FreeTDS/freetds@c6686aa |
@metaskills dbanydatecrack handling the bytes is a good proposition. +1 for that. @freddy77 the change looks good. |
Sorry for the late reply. I finished the [datetimeoffset] type implementation.
@freddy77 I think 0.95 latest has a bug in it. The |
Closing this issue. Pull request #245 is about to land! |
Work is now in master. |
This work needs to happen once we support FreeTDS 0.95 via #233. Here are the data types we want to support.
I created a new thread on FreeTDS' list. The new one is titled Compiling Against FreeTDS 0.95 w/7.3 TDSVER Features Possible?. A reply is below.
cc @saurabh500
The text was updated successfully, but these errors were encountered: