You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is known as GUID/UUID endian issue. I'm not sure if byte order in UUID type is actually wrong, at least reading-writing to-from SQL server works just fine. However when UUID is converted to string or from string then endianness goes wrong. Usually its not neccessary to display UUID's as text but sometimes its needed and then it matters.
And sometimes its really needed to have UUID's as constants in the code and the most convenient way would be to have them in string format. This is another cenario when endianness issue gets on the way. Currently the only apparent way with this package is to convert UUID strings into wrong endianness and then convert it to UUID type. Thats a working workaround. But it would be really nice to have conversion from string handling both little and big endian.
Hi
I meet a problem when I use this code to query from Sql Server.
I define a "UNIQUEIDENTIFIER" column in database, i use "id uuid.UUID" to query from database.
The right value in DB is "C74037D4-D0BA-471C-9200-31187972F117".
But what i got is "d43740c7-bad0-1c47-9200-31187972f117", it seemed that front third has wrong sequence.
I see UUID define is "type UUID [Size]byte", it seems that it don't care network sequence.
I use this package "database/sql" to query DB which will process UUID as []byte.
It seemed that there will be a problem when UUID used in network.
Best regards
Forston
The text was updated successfully, but these errors were encountered: