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

Perform conversions in GetByte #695

Closed
bgrainger opened this issue Sep 12, 2019 · 1 comment
Closed

Perform conversions in GetByte #695

bgrainger opened this issue Sep 12, 2019 · 1 comment
Assignees
Milestone

Comments

@bgrainger
Copy link
Member

MySqlDataReader.GetByte() doesn't perform conversions from any other integral type, but GetInt16, GetInt32, etc. will perform narrowing conversions (with overflow checks) from MEDIUMINT, BIGINT, etc.

SqlClient and MySql.Data don't support implicit conversions in GetByte, but Npgsql and Microsoft.Data.Sqlite do. It doesn't seem like it would be that wrong to be internally consistent with GetInt16/GetInt32.

This may also be helpful for PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#820.

@bgrainger bgrainger self-assigned this Sep 20, 2019
@bgrainger bgrainger added this to the 1.0 milestone Sep 20, 2019
@bgrainger
Copy link
Member Author

Added in 0.57.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant