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
SqlBatch: Add missing overrides and tests #2223
Conversation
@Wraith2 I think you also want to override the related methods missing on SqlClientFactory (here are the original specs): public virtual DbBatch CreateBatch() => throw new NotSupportedException();
public virtual DbBatchCommand CreateBatchCommand() => throw new NotSupportedException();
// Covers both CreateBatch and CreateBatchCommand
public virtual bool CanCreateBatch => false; |
Those are in a separate file: Lines 9 to 18 in d30d9d1
|
My bad - I missed that when looking at the source code! Great that they're there. |
They should light up as soon as the team add a net8 build. |
Do these APIs need to be in the ref assemblies, too? |
They're overrides so I wouldn't expect to see them in the ref assembly since they're defined on the base class and we didn't merge our own copies of the base classes. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2223 +/- ##
==========================================
- Coverage 71.49% 68.42% -3.08%
==========================================
Files 309 309
Lines 62181 62183 +2
==========================================
- Hits 44459 42547 -1912
- Misses 17722 19636 +1914
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fixes #2222
Add missing overrides for SqlConnection CanCreateBatch and CreateDbBatch() and tests
Add test for SqlBatchCommand CanCreateParameter and CreateParameter() wrapped in #ifdef
Adding a net8 build is out of scope for this PR. That needs approval at very least from the MS side. When it is added the net8 features and tests related to the sql batch feature should light up automatically.
@David-Engel we'll want to get this in before the next preview.
/cc @mgravell