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

query_all missing first DB::ResultSet entry #202

Open
carcinocron opened this issue Feb 1, 2020 · 1 comment
Open

query_all missing first DB::ResultSet entry #202

carcinocron opened this issue Feb 1, 2020 · 1 comment

Comments

@carcinocron
Copy link

What is the intended difference between query and query_all? I was using query_all then noticed that the first expected entry from the query was always missing. Changing to just query fixed this.

@bcardiff
Copy link
Collaborator

bcardiff commented Feb 1, 2020

query_all should return an Array with one element per row
query will yield a result set that you are responsible to iterate.

The documentation for such methods live in http://crystal-lang.github.io/crystal-db/api/latest/DB/QueryMethods.html

If you can share some small code to reproduce the unexpected behaviour we can see what might be happening.

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

No branches or pull requests

2 participants