fsprojects / fsprojects/FSharp.Data.SqlClient

Expose a PrepareRawCommand method on SqlCommand objects

Open
#244 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion improvement
Dominant language
F#
Stars
206
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Due to specifics of return value, I sometimes need to use manually created System.Data.SqlClient.SqlCommand objects that I obtain from typed SqlCommand objects, I'd like to actually still leverage type checking on input parameters of those.

I'm thinking adding a PrepareRawCommand method with parameters matching the Execute method and returning the raw command would avoid cases where I need to set a list of parameters without compile time checks on the name and type of values.

Would such an addition to the API being considered if I provide the implementation?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the typed SqlCommand API and its Execute method, which the issue identifies as the model for the new method. Confirm with maintainers how PrepareRawCommand should preserve compile-time parameter checks while returning System.Data.SqlClient.SqlCommand; done means an agreed API design and implementation that supports the described parameter use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp, sql
Domain
api, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.