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

Remove SqlCommand code paths for context connections #2996

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

edwardneal
Copy link
Contributor

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 in SqlCommand.ExecuteNonQuery and SqlCommand.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 the context 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.

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.67%. Comparing base (22ac587) to head (2e3d84f).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2996      +/-   ##
==========================================
+ Coverage   72.61%   73.67%   +1.06%     
==========================================
  Files         285      281       -4     
  Lines       59162    58316     -846     
==========================================
+ Hits        42963    42967       +4     
+ Misses      16199    15349     -850     
Flag Coverage Δ
addons 92.58% <ø> (ø)
netcore 75.41% <100.00%> (-0.01%) ⬇️
netfx 72.57% <100.00%> (+1.57%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@benrr101 benrr101 left a 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 💣

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

Successfully merging this pull request may close these issues.

2 participants