-
Notifications
You must be signed in to change notification settings - Fork 20
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 for uniqueidentifier / UUIDs #20
Comments
Unfortunately supporting additional column types is quite challenging since it would require changes to the driver being used, either in the form of updates to Erlang's ODBC driver or the development of a new driver for Elixir/Erlang. I heard @toddharding might be working on patching Erlang ODBC in this way but there's no ETA since it's work beyond what we can justify doing on paid company time. Do contact him if you know C and/or the OTP codebase and want to help get it done. |
The reference issue #31 |
I had a go at doing a similar issue to this myself a few months ago, around adding a That code base was just far too complex for me to understand, reason about and then modify it correctly. It was also very difficult to get it set-up correctly on my machine. I ended up losing motivating and abandoning it. Anyone who has the motivation to give it a go, there are a few useful resources in that issue and the bug board it links to has some helpful people on it. |
Not having some of these native data types fields supported really hurts any elixir/erlang + MS SQL Server development or applications. I would hope that some of the folks from Microsoft would help out a little for their product. Since I can't get it to work with MS SQL Server, I'll migrate the data to PostgreSQL and work with it from there. As a Long shot, maybe some of the folks at MSSQL-docker can refer us to someone that can help @LuisBosquez |
@cdesch It's easy enough to patch the odbc to handle guid types (https://github.com/noizu/otp) by basically treating them as another char type column. For example with the above quick and dirty fork I can work with MSSQL if changing binary_id columns to :string or modifying the ecto.uuid.load method to accept the sql_guid string in addition to raw binary input format. I need this functionality as well so I'll be trying to get something accepted upstream but it while take a bit of time to line up all the details. |
I would love to see support for the native MS-SQL
uniqueidentifier
datatype.Expected Behavior
Mapping
:binary_id
touniqueidentifier
Current Behavior
Currently data returned with a
uniqueidentifier
datatype raises an error:Possible Solution
Something like
https://github.com/elixir-ecto/postgrex/blob/b1c0d7e4fd517b56fbd3bcdb7f2ee21e107c2665/lib/postgrex/extensions/uuid.ex##
Context
Using UUID is pretty standard behaviour I would assume.
The text was updated successfully, but these errors were encountered: