New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass the context into Close calls #304
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Some questions.
sql/analyzer/releaser.go
Outdated
@@ -75,16 +75,16 @@ type releaseIter struct { | |||
func (i *releaseIter) Next() (sql.Row, error) { | |||
row, err := i.child.Next() | |||
if err != nil { | |||
_ = i.Close() | |||
_ = i.Close(nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next(*sql.Context) (sql.Row, error)
wen?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it. It's only going to get worse. Should probably do it soon.
sql/row_test.go
Outdated
@@ -33,7 +33,7 @@ func TestRowsToRowIterEmpty(t *testing.T) { | |||
require.Equal(io.EOF, err) | |||
require.Nil(r) | |||
|
|||
err = iter.Close() | |||
err = iter.Close(nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a fake Context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
No description provided.