Skip to content

Return true from NpgsqlDataReader.HasRows even after all rows have been read - #181

Merged
franciscojunior merged 1 commit into
npgsql:masterfrom
jbcooley:has_rows_true
Mar 10, 2014
Merged

franciscojunior merged 1 commit into
npgsql:masterfrom
jbcooley:has_rows_true

Conversation

@jbcooley

@jbcooley jbcooley commented Mar 9, 2014

Copy link
Copy Markdown
Contributor

SqlClient returns true after all rows are read. This value changes with calls to NextResult. This is a breaking change, but brings Npgsql to match other providers. See https://groups.google.com/forum/#!topic/npgsql-help/feWIoTJJF9E for a users encounter with this bug.

@franciscojunior

Copy link
Copy Markdown
Member

For more information, check the comments on the previous commit:
c7b5c36:

I'm adding my own comment here again:

I also agree this is a breaking change but as Josh said, I don't think people use the HasRows the way Npgsql was implemented. I think the most probable to happen is what is happening now: people is used to the way SqlClient and other providers work ( with the HasRows returning true ) and report the different behavior with Npgsql. This also happened with the GetResultSchema #174 as well as ConnectionState #164.

As soon as Josh creates the pull request, we will mark it as breaking change so if we have any complaints about that in the future we will know which pull request made this change and we can study it better. But I think nobody will complain about this change.

franciscojunior added a commit that referenced this pull request Mar 10, 2014
Return true from NpgsqlDataReader.HasRows even after all rows have been read
@franciscojunior
franciscojunior merged commit 3a34ff4 into npgsql:master Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants