denisenkom / go-mssqldb

Microsoft SQL server driver written in go language
BSD 3-Clause "New" or "Revised" License
1.82k stars 497 forks source link

Add Nullable version of uniqueidentifier #608

Open jeebiq opened 3 years ago

denisenkom commented 3 years ago

Why do you think this is the right way of adding new type support?

jeebiq commented 3 years ago

I didn't see anything in the readme about how you wished to have anything new added, so I added as new/dedicated files to keep it as simple as possible for me without touching the existing code.

denisenkom commented 3 years ago

You need to add a roundtrip test with the actual SQL server. One test should set a value in the SQL and read it uniqueidentifier. Another test should verify sending uniqueidentifier value into SQL server and then read it back and compare with original. Each test should test actual value and NULL.