DATA-DOG / go-txdb

Immutable transaction isolated sql driver for golang
Other
667 stars 48 forks source link

Add support for ScanType in ColumnType. #47

Closed ghost closed 2 years ago

ghost commented 2 years ago

The ColumnType.ScanType() function returns information about the type which is expected to be passed to the Rows.Scan() function for the corresponding column. Without this commit go-txdb will claim everything should be an interface{} which, while not exactly wrong, is not particularly helpful.

I've also added a quick test to the PostgreSQL suite since that's where I'm thinking about using this library, but AFAIK this should also be effective for MySQL.

l3pp4rd commented 2 years ago

thanks, sorry for late response