crystal-pg icon indicating copy to clipboard operation
crystal-pg copied to clipboard

query_all missing first DB::ResultSet entry

Open carcinocron opened this issue 4 years ago • 1 comments

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.

carcinocron avatar Feb 01 '20 21:02 carcinocron

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.

bcardiff avatar Feb 01 '20 23:02 bcardiff