fsprojects / fsprojects/FSharp.Data.SqlClient

Question: Why is FSharp.Data.SqlClient.DesignTime implemented as a class

Open
#352 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I was wondering why FSharp.Data.SqlClient.DesignTime and friends are implemented as a class with a private constructor instead of simply being a module with let bound functions.

Wouldn't this be more terse?

// static class 
type DesignTime private() = 
  static member internal GetRecordType(columns: Column list, ?unitsOfMeasurePerSchema) =
  ...
// module 
module DesignType = 
  let internal GetRecordType(columns: Column list, ?unitsOfMeasurePerSchema) =
  ...

I was thinking its because the members can use each other?

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

No file or test is identified. Start by searching the repository for DesignTime and its related types, then compare their definitions with their call sites. Done means documenting the reason for the chosen representation or obtaining a maintainer explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp, sql
Domain
databases, tooling
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.