Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
database/sql: add error getter on sql.Row #35804
What version of Go are you using (
Example 2 extends example 1:
I would like both the
So that I can pass this types as DB or Tx connetion objects to the ORM.
Ultimately, a caller of my package's objects could replace:
And keep the same chaining as the
The benefit I would cite to adding it would be it allows you to differentiate query errors from Scan errors and in a framework act appropriately to each.
The two strikes against this proposal is that (1) it makes this less of a convenience method (expands use case rather then just using *Result for most use cases) and (2) I tend to make different types of abstractions then what is presented here.
I'm fine with adding this.