Add command flags to overloads
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
I have many scenarios where in order to optimize queries I generate a lot of dynamic SQL with no paramenters and use CommandFlags.NoCache. I also use some unbuffered results too.
Currently, you must replace
cnn.QueryAsync<x>(sql);
with
cnn.QueryAsync<x>(new CommandDefinition(sql, flags: CommandFlags.NoCache));
which adds some boilerplate to a simple query command.
I know it's just for convenience, but would it be possible to add CommandFlags as one of the default overload parameters to the existing commands?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing QueryAsync overloads and the CommandDefinition type used in the examples. Review how current overloads handle command execution, then confirm that callers can supply CommandFlags such as NoCache without constructing CommandDefinition while existing simple calls continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100