database/sql: include SQL column name in Scan() error message
When 'convertAssign' gives an error, instead of giving just the index of the failing column -- which is not always helpful, especially when there are lots of columns in the query -- utilize 'rs.rowsi.Columns()' to extract the underlying column name and include that in the error string: sql: Scan error on column index 0, name "some_column": ... Fixes #23362 Change-Id: I0fe71ff3c25f4c0dd9fc6aa2c2da2360dd93e3e0 Reviewed-on: https://go-review.googlesource.com/86537Reviewed-by: Harald Nordgren <haraldnordgren@gmail.com> Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please
register
or
sign in
to comment