Skip to content
CAI
Software that uses CAICheck a score

Zaid-Ajaj/Npgsql.FSharp

53.9

Adequate · 13 November 2026

1.1k

lines of production code

F#

with JavaScript

8

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 54 → 54 (-0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 90 → 89 (-1.3)
  • Architecture 100 → 100 (+0.0)
  • Maturity 47 → 47 (-0.1)
  • Readiness 33 → 33 (+0.0)
  • Security 98 → 100 (+1.6)
  • Performance 100 → 100 (+0.0)

Resolved (7)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no project overview (docs/app/usecases/simple-query.md)
  • Duplicated block (8 lines × 2) (src/Npgsql.FSharp.fs)
  • Duplicated block (9 lines × 2) (src/Npgsql.FSharp.fs)
  • IL efficiency: 2 authored method(s) exceed the IL budget (src/Npgsql.FSharp.fs)
  • Outdated: Microsoft.SourceLink.GitHub
  • Outdated: System.Text.Json

New (2)

  • Outdated: Microsoft.SourceLink.GitHub (src/Npgsql.FSharp.fsproj)
  • Outdated: System.Text.Json (src/Npgsql.FSharp.fsproj)

Architecture

  • Unchanged — 0 containers · 2 contexts · 0 edges

Written by cca.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 13 November 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.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-b8b1a43ae4c3.