fsprojects / fsprojects/FSharp.Data.SqlClient

Allow use pre-existing type for SqlCommandProvider

Open
#334 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I would find it useful to have a new ResultType option for specifying a user-supplied type as the output type for a query. This may be very vaguely related to #326.

In the scenario where I would have use for this, I've got a set of 7 or 8 related search queries that each search on different criteria, but all return a result set with the same shape. It's also a fairly wide result set, and I end up with a couple hundred lines of duplicated code parsing and mapping each command's Execute result into a domain type.

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

The issue names SqlCommandProvider and a new ResultType option but no files or tests. Start by tracing the existing ResultType behavior and determine how one user-supplied type can cover multiple queries with the same result shape; done means the duplicated result mapping is no longer needed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.