Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. F#
  3. FSharp.Data.SqlClient

FSharp.Data.SqlClient

NOASSERTIONF#v1.8.2

F# type providers for statically typed, compile-time checked access to Microsoft SQL Server databases.

Visit WebsiteGitHubGitHub
205 stars66 forks0 contributors

What is FSharp.Data.SqlClient?

FSharp.Data.SqlClient is a set of F# type providers that enable statically typed, compile-time checked access to Microsoft SQL Server databases. It allows developers to write SQL queries and interact with database objects with full type safety, catching errors during compilation rather than at runtime. The library provides type providers for SQL commands, programmability objects, enums, and external SQL files.

Target Audience

F# developers working with Microsoft SQL Server who want type-safe database access and compile-time validation of their SQL queries and database interactions.

Value Proposition

Developers choose FSharp.Data.SqlClient because it eliminates common runtime SQL errors through compile-time validation, provides idiomatic F# APIs for database operations, and leverages F#'s powerful type provider system for a seamless development experience.

Overview

A set of F# Type Providers for statically typed access to MS SQL database

Use Cases

Best For

  • Building type-safe data access layers in F# applications
  • Eliminating runtime SQL errors through compile-time validation
  • Working with stored procedures and user-defined types in F#
  • Creating F# applications that require robust SQL Server integration
  • Developing data-intensive F# applications with guaranteed query correctness
  • Teams wanting to enforce database schema consistency in their F# codebase

Not Ideal For

  • Projects using databases other than Microsoft SQL Server, such as PostgreSQL or MySQL
  • Development workflows that rely heavily on F# Interactive for real-time query testing and scripting
  • Applications requiring dynamic, runtime-generated SQL queries where schemas are not known at compile time
  • Teams primarily using .NET languages other than F#, as the type providers are F#-specific

Pros & Cons

Pros

Compile-Time SQL Validation

Catches SQL syntax errors, parameter type mismatches, and missing database objects during compilation, as shown in SqlCommandProvider examples where invalid queries fail at compile time.

Type-Safe Database Objects

Exposes tables, stored procedures, UDTs, and functions directly in F# code via SqlProgrammabilityProvider, ensuring schema consistency and eliminating runtime errors from changes.

Idiomatic F# Integration

Provides natural F# APIs with sequence support and null handling using option types, as seen in examples with match expressions for optional values.

External SQL File Support

Allows SQL commands to be stored in separate .sql files using SqlFileProvider, maintaining type safety while improving code organization and reuse.

Cons

Vendor Lock-in to SQL Server

Only supports Microsoft SQL Server, making it unsuitable for multi-database or cross-platform projects without significant workarounds.

No F# Interactive Support

The README explicitly states 'dotnet fsi is not supported yet,' hindering interactive development and quick prototyping in REPL environments.

Learning Curve for Type Providers

Requires familiarity with F#'s type provider mechanism, which can be complex for developers new to F# or accustomed to traditional ORMs like Entity Framework.

Frequently Asked Questions

Quick Stats

Stars205
Forks66
Contributors0
Open Issues67
Last commit15 days ago
CreatedSince 2013

Tags

#typeprovider#database-access#type-providers#f-sharp#static-typing#sql-server#dotnet#sqlserver#orm-alternative#fsharp#compile-time-checking#tsql#sql

Built With

F
F#
M
MS SQL Server
.
.NET

Links & Resources

Website

Included in

F#1.4k
Auto-fetched 1 day ago

Related Projects

FSharp.DataFSharp.Data

F# Data: Library for Data Access

Stars868
Forks284
Last commit14 days ago
Rezoom.SQLRezoom.SQL

Statically typechecks a common SQL dialect and translates it to various RDBMS backends

Stars678
Forks23
Last commit2 days ago
SQLProviderSQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.

Stars624
Forks149
Last commit1 month ago
SwaggerProviderSwaggerProvider

F# generative Type Provider for Swagger

Stars277
Forks60
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub