Skip to content

ResultSet#each and Statement#each should splat record passed to block #18

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jstewmon
Copy link

This PR is based on tag 2.9.9. Github is not allowing a tag to be specified as the base branch.

If the record is not splatted, a block that processes a result set that
contains a single column receives the column as an array with a single value.

The problem is demonstrated by many of the tests that already existed, so no
new tests are provided with this commit. Instead, all of the tests that
demonstrated this problem have been updated so that queries returning a single
column use the value of that column without wrapping it in an array.

… Stmt#each

If the record is not splatted, a block that processes a result set that
contains a single column receives the column as an array with a single value.

The problem is demonstrated by many of the tests that already existed, so no
new tests are provided with this commit. Instead, all of the tests that
demonstrated this problem have been updated so that queries returning a single
column use the value of that column without wrapping it in an array.
@tmtm tmtm force-pushed the master branch 3 times, most recently from a05cc94 to b367feb Compare October 31, 2021 11:02
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.

1 participant