Skip to content
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

Merged
merged 6 commits into from Feb 18, 2021
Merged

pass the context into Close calls #304

merged 6 commits into from Feb 18, 2021

Conversation

bheni
Copy link
Contributor

@bheni bheni commented Feb 17, 2021

No description provided.

@bheni bheni requested a review from zachmu February 17, 2021 22:23
Copy link
Contributor

@reltuk reltuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Some questions.

@@ -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)
Copy link
Contributor

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?!

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a fake Context.

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@bheni bheni merged commit 7e4ae6c into master Feb 18, 2021
@bheni bheni deleted the bh/context-to-close branch February 18, 2021 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants