-
Notifications
You must be signed in to change notification settings - Fork 314
Remove SqlCommand code paths for context connections #2996
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
Remove SqlCommand code paths for context connections #2996
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2996 +/- ##
==========================================
- Coverage 67.04% 59.60% -7.45%
==========================================
Files 300 288 -12
Lines 65376 64484 -892
==========================================
- Hits 43831 38433 -5398
- Misses 21545 26051 +4506
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am 10000% ok with these changes. My only complain its I'm kinda jealous I'm not the one getting to delete all this code 💣
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
I've addressed the merge conflict on this, can someone re-run CI please? |
The new merge conflict is now resolved. I'd appreciate a CI run and review. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I've dealt with the merge conflict - could this be run through CI and reviewed please? |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@edwardneal How's this one looking now that we've got most of the SMI code removed? Can we close it out or is there other stuff that we haven't covered yet? |
We're almost done. The only things remaining are the work submitted in #3438, the removal of I don't think we need this PR for that - once we're happy with #3438, I'll clean the two other points up separately. |
Contributes to #2838. PR 2/7.
This doesn't need to be merged before 6.0. It removes the core
SqlDataReaderSmi
type, and the code paths inSqlCommand.ExecuteNonQuery
andSqlCommand.ExecuteReader
which reference it. There are also a handful of Stream and TextReader derivatives which are only used in those contexts.One point of note is in SqlDataRecord. InOutOfProcHelper.InProc will always be false, so I've trimmed the dead code in the if condition. As a result,
_recordContext
will always be null, and null will always propagate to thecontext
parameter in ValueUtilsSmi. I plan to clean this up in the next PR.If this is too large to review, I can partially revert some of these removals.