Dapper icon indicating copy to clipboard operation
Dapper copied to clipboard

add cancellationToken to async methods, add QueryAsync command method…

Open AlexeyVasiliev opened this issue 5 years ago • 4 comments

… with Array of types in the recordset

AlexeyVasiliev avatar Feb 16 '21 10:02 AlexeyVasiliev

Unfortunately - these are all breaking changes. It's something we'll address in the next major version of Dapper, but aren't aiming to do in the current APIs due to the breaking nature (adding optional params would break all libraries compiled on top of Dapper - it's not binary compatible).

I'll leave this open for any questions, but aim to cleanup and close out in a few days if all is understood here.

NickCraver avatar Apr 27 '21 22:04 NickCraver

Unfortunately - these are all breaking changes. It's something we'll address in the next major version of Dapper, but aren't aiming to do in the current APIs due to the breaking nature (adding optional params would break all libraries compiled on top of Dapper - it's not binary compatible).

Would adding new overloads with non optional cancellationToken papramater still be considered a breaking change?

Herostwist avatar Nov 01 '21 14:11 Herostwist

Would adding new overloads with non optional cancellationToken papramater still be considered a breaking change?

It would not, but it would create a lot of extra methods to maintain. Given the plan to change the overall interface of how we layer in vNext, I think we'd want to add them once...and take this breaking change since people would need to compile against it anyway.

NickCraver avatar Jan 04 '22 13:01 NickCraver

Would it instead be possible to grant directly access to the currently private methods executing this, that accepts CommandDefinitions (which does have CancellationTokens), in the mean time?

DSchougaard avatar Mar 23 '22 08:03 DSchougaard