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

fix: always set a value for dest in Next #34

Merged
merged 4 commits into from
Aug 23, 2021
Merged

Conversation

olavloite
Copy link
Collaborator

The Next method should always set a value for each dest[i] element, even when it is nil, as the sql package reuses the same array for multiple calls to Next. This means that the previous value would be returned if the in some cases when the database value was NULL.

The Next method should **always** set a value for each dest[i] element,
even when it is nil, as the sql package reuses the same array for multiple
calls to Next. This means that the previous value would be returned if the
in some cases when the database value was NULL.
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 20, 2021
rows_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@hengfengli hengfengli left a comment

Choose a reason for hiding this comment

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

LGTM.

@olavloite olavloite merged commit 7b8190c into main Aug 23, 2021
@olavloite olavloite deleted the always-set-value branch August 23, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants