I have some long-running queries that I'd like to cancel mid execution if the API request is canceled by the browser. I'm using SqlKata to execute my queries and I don't see a param for cancellation tokens. How would I be able to have my query canceled?
I would want something like this query.GetAsync<T>(cancelationToken: cancelationToken)
Looks like the latest version of sql kata has it as one of the params. I just upgraded packages
SqlKata
andSqlKata.Execution
to version 2.3.3 and I see it in the source code.Alternatively, you can manually run it via Dapper by getting the SQL string and bindings from SqlKata and passing it into Dapper. I didn't test this but it would be something like this: