denisenkom / go-mssqldb

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

Cannot Scan a null UniqueIdentifier value #725

Open shueybubbles opened 2 years ago

shueybubbles commented 2 years ago

The following TSQL query can't be processed using *mssql.UniqueIdentifier as the destination:

select convert(uniqueidentifier, null)

Similar to scanning into *interface{} the driver should support a nil value

Perhaps re-define the type?

type UniqueIdentifier *[16]byte