SqlBatchCommand support CommandBehavior#4125
Conversation
0629d0c to
19a768e
Compare
19a768e to
fe1ee31
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4125 +/- ##
==========================================
- Coverage 66.57% 64.74% -1.83%
==========================================
Files 284 279 -5
Lines 43301 66225 +22924
==========================================
+ Hits 28827 42879 +14052
- Misses 14474 23346 +8872
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:
|
mdaigle
left a comment
There was a problem hiding this comment.
Overall, I have some concerns about existing behavior that we have copied over without explanation and I would like to remove any unnecessary refactors.
|
Thank you for making those changes. I'll do another review pass on Monday. |
|
Throwing exceptions is a breaking change, but not sure if somebody used it. So I am fine either way (validation or doc or both). |
mdaigle
left a comment
There was a problem hiding this comment.
Those changes look good. Let's note the restriction in a doc comment.
|
I updated the doc comments. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@cheenamalhotra this is ready for another review |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Mentioning @Wraith2 if he's interesting in reviewing too as the primary contributor of SqlBatch support in the driver :) |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
#1825 added the Batch APIs and also added a
CommandBehaviorproperty toSqlBatchCommandwhich was completly unused.Note:
SqlBatchCommand.CommandBehavioris a custom property in SqlClient which isn't in the DbBatchCommandAlso the
CommandBehaviorforExecuteReaderwas ignored.This PR enables the use of the
SqlBatchCommand.CommandBehaviorand also supports passingCommandBehaviortoExecuteReader.Issues
Fixes #4083
Testing
Added tests for passing
CommandBehavior.SchemaOnly | CommandBehavior.KeyInfotoSqlBatchCommand.CommandBehavior.Added tests for passing
CommandBehavior.CloseConnectiontoExecuteReader.