Corollary to my previous question: Is it possible to retrieve a column value by name using GoLang database.sql:
sql.Rows.scan()
requires a correctly typed variable correctly positioned in the scan() call. This can be tedious and also requires the developer to have the db schema available - not always viable. I was trying to get this to work passing an empty interface{}
pointer for all arguments. But this hasn't work out well thus far, and also requires type assertion when accessing the values, which will be expensive. Is there a way to do this?
There's been a longer discussion about this on the golang nuts mailing list. See https://groups.google.com/forum/#!topic/golang-nuts/Fvwz10kvLLE.