Missing signature on QueryAsync method
I'm using this method signature for QueryAsync: public static Task<IEnumerable> QueryAsync(this IDbConnection cnn, string sql, Type[] types, Func<object[], TReturn> map, object? param = null, IDbTransaction? transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
I need to pass a Cancellation token but there is no available signature with Type[] types, Func<object[], TReturn> map and string splitOn parameters. I tried to used the signature with a CommandDefinition object because it contains a property named CancellationToken but this signature doesn't contain types, map and splitOn too. Is it possible to add it in a future release ?
I searched the entire Internet and found no information about this.. What should I do with complex queries? Does it turn out that developers using dapper have to turn a blind eye to security and speed? If the user clicks 10,000 times in a row on the button to receive data from the api and it is the QueryAsync method that is complex and WITHOUT a cancellation token, what happens then?
Use a QueryAsync definition that takes a CommandDefinition, pass your CancellationToken to the CommandDefinition constructor.
Use a
QueryAsyncdefinition that takes aCommandDefinition, pass yourCancellationTokento theCommandDefinitionconstructor.
for simple tasks. If we need insert mapper, types, split on parameters???