Skip to content
CAI
Software that uses CAICheck a score

Zaid-Ajaj/Npgsql.FSharp

52.2

Adequate · 23 September 2026

1.1k

lines of production code

F#

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an F\# library that provides a type-safe, fluent API for executing SQL queries against a PostgreSQL database using the Npgsql provider. It manages database connections, parameterized queries, and transactions while supporting a broad range of data types, including JSON, dates, and arrays. The project includes a modernized build and test infrastructure for .NET 8.0, replacing older dependency management and legacy test suites.

Features

Introduced new build system scripts for building, testing, and publishing the library

The build directory now contains new F\# scripts (Files.fs, Program.fs, Tools.fs) that define the build workflow. These scripts provide commands to build the solution, run tests, and publish NuGet packages, utilizing the dotnet CLI and Fake build system utilities for cross-platform compatibility and automated publishing workflows.

build · high confidence

Removals

Removed obsolete integration test suite

The legacy integration test file (Tests.fs) and its associated package references have been removed from the integration-tests directory. This cleanup eliminates outdated test code that was superseded by newer test implementations.

integration-tests · high confidence

Behavioural changes

Major API overhaul and documentation update for v3.0

The library introduces a significant API change by replacing the previous \Sql.executeSingleRow\ and \Sql.executeTable\ methods with a new \Sql.execute\ function that accepts a reader function, allowing for more flexible and type-safe result mapping. The documentation has been completely rewritten to reflect these changes, providing updated examples for connecting to databases, executing parameterized queries, handling null values, and managing transactions. The README now serves as the primary entry point for usage instructions.

(repo-wide) · high confidence

Major API overhaul and expanded type support

The library has been refactored to replace the previous \Sql\ type and \SqlRow\/\SqlTable\ structures with a new \SqlValue\ model that supports a wider range of data types, including \Jsonb\, \DateOnly\, \Point\, and various array types. The \Sql\ module now exposes a fluent configuration API for connection strings, SSL modes, and client certificates, while removing the dependency on \Giraffe.Tasks\. This change alters how parameters are passed and results are read, requiring users to update their code to use the new \SqlValue\ constructors and optional parameter methods (e.g., \intOrNone\).

src · high confidence

Test coverage

Added integration tests for the Npgsql.FSharp library

Added a new test suite in the \tests\ directory to verify the functionality of the Npgsql.FSharp library. The \Main.fs\ file sets up the test runner, while \NpgsqlFSharpTests.fs\ contains integration tests covering SQL execution, row reading, and transaction handling using a PostgreSQL container. The tests validate features such as \Sql.executeTransaction\, \Sql.executeRow\, \Sql.iter\, and manual transaction handling.

tests · high confidence

Dependencies

Update project dependencies and build configuration

The project has been updated to target .NET 8.0, with the main library and test project both set to the \net8.0\ framework. The \paket.dependencies\ and \paket.lock\ files have been removed, and the project now uses standard \.fsproj\ files with \PackageReference\ for dependencies like \Npgsql\ (v8.0.6) and \System.Text.Json\ (v8.0.5). Additionally, the documentation site's \package.json\ and \package-lock.json\ have been added, introducing \gh-pages\ and \live-server\ as dev dependencies.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 52 → 52 (-0.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 88 → 88 (+0.0)
  • Architecture 100 → 99 (-0.6)
  • Maturity 46 → 46 (+0.0)
  • Readiness 33 → 33 (-0.1)
  • Security 100 → 98 (-1.6)

Resolved (9)

  • Duplicated block (12 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (5 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (7 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (8 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (9 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (9 lines × 3) (src/Npgsql.FSharp.fs)
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (10)

  • Documentation: no installation or build instructions (docs/app/usecases/add-use-case.md)
  • Duplicated block (11 lines × 3) (src/Npgsql.FSharp.fs)
  • Duplicated block (11–12 lines × 4) (src/Npgsql.FSharp.fs)
  • Duplicated block (14 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (17 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (8 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (9 lines × 2) (src/Npgsql.FSharp.fs)
  • High CVE: SSH.NET 2023.0.0
  • Medium CVE: Microsoft.Build.Tasks.Git 8.0.0
  • Outdated: FSharp.Core

Architecture

  • Containers 0 added · 0 removed · contexts 2 added · 0 removed · edges 0 added · 0 removed

Added bounded contexts (2)

  • Npgsql.FSharp
  • Tests

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Zaid-Ajaj/Npgsql.FSharp was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b82e22958a4e786e7f83802be332d8298b82d6d7 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.