Efcore: BufferedDataReader needs to be accommodating to incorrect values

Created on 20 Mar 2020  路  5Comments  路  Source: dotnet/efcore

While working on #20278, we enabled tests which has wrong data to verify we throw better exceptions. All the tests are working correctly for Sqlite. But for SqlServer where we use BufferedDataReader, the reader throws early exception while trying to read values. Hence the code not reach the place where we intercept exception to throw better message (that code is part of shaper), BufferedDataReader buffers before calling into shaper.

area-query closed-fixed punted-for-5.0 type-bug

Most helpful comment

Adding a property to RelationalCommandParameterObject is not a breaking change.
@dotnet/efteam Does anyone think we shouldn't do this in 5.0?

All 5 comments

This requires passing enabledDetailedErrors to Execute method via RelationalCommandParameterObject which is public.

Adding a property to RelationalCommandParameterObject is not a breaking change.
@dotnet/efteam Does anyone think we shouldn't do this in 5.0?

No new ctor to take value for that parameter?

No new ctor to take value for that parameter?

Yes, a new overload

I'm good with it.

Was this page helpful?
0 / 5 - 0 ratings