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

added #empty? to MySql2::Result #1003

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

Conversation

walf443
Copy link

@walf443 walf443 commented Sep 17, 2018

result = client.qeury("SELECT 1 FROM mysql2_test")
unless result.empty? # currently it need to write `if result.count > 0`
   # do something with `result`
end

MySql2::Result include Enumerable. If it added #empty? method, I'm happy to write a code with more rubyish style.

@sodabrew
Copy link
Collaborator

sodabrew commented Sep 17, 2018 via email

@sodabrew sodabrew added this to the 0.6.0 milestone Nov 1, 2018
@sodabrew
Copy link
Collaborator

sodabrew commented Nov 1, 2018

Accepted for next major.

@walf443
Copy link
Author

walf443 commented Nov 2, 2018

oh I see. thanks.

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.

2 participants