nakagami / firebirdsql

Firebird RDBMS sql driver for Go (golang)
MIT License
227 stars 60 forks source link

sql: Scan error on column index X: unsupported Scan, storing driver.Value type time.Time into type *sql.RawBytes #48

Open igorsousa-b opened 6 years ago

igorsousa-b commented 6 years ago

The application I'm developing gets a list of queries from a file, adds the query string to a map and runs the actually when needed. This means that the columns that the query will scan into are unknown before running the query.

To solve this, I've this a gist I've found here (I use the map version). If the query doesn't return a column of type Time, it works perfectly. If it does contain a Time column, I get the error mentioned in the title.

This seems to be a common issue with golang's sql implementation. Most users seem to fix this by adding ?parseTime=true at the end of their connection string. This seems to do nothing for me.