Skip to content
CAI
Software that uses CAICheck a score

jacentino/DbFun

62.5

Adequate · 3 October 2026

9.1k

lines of production code

F#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

DbFun is a functional F\# data access library that provides a type-safe, high-performance interface for executing raw SQL queries against multiple database systems. It supports Microsoft SQL Server, PostgreSQL, Oracle, Firebird, MySQL, and SQLite, offering features such as bulk imports, array parameters, and multi-database transaction management. The system includes specialized providers for each database engine and a testing toolkit with mocking infrastructure to facilitate unit and integration testing.

How it got here

2023 — DbFun initial release and test coverage

16 changes.

This period marks the initial release of DbFun, a functional F\# data access library, introducing core multi-database support and specific provider implementations for SQL Server, PostgreSQL, MySQL, Oracle, and SQLite. Significant effort was dedicated to establishing comprehensive test coverage, including unit tests for core workflows and integration tests for each database provider to validate features like bulk imports, array handling, and transaction management.

2024–2025 — Database provider expansion and performance optimization

6 changes.

This period focused on extending DbFun's support for Oracle and Firebird databases, introducing features like bulk copy, array parameters, and batch processing. Concurrently, the project enhanced overall performance by integrating FastExpressionCompiler for LINQ query compilation and expanded test coverage across multiple database providers to ensure reliability.

Features

Add FastExpressionCompiler integration for DbFun

Introduces a new FastExpressionCompiler module that provides a high-performance alternative for compiling LINQ expressions. This change adds a new Compiler implementation based on the FastExpressionCompiler library and exposes extension methods (UseFastExpressionCompiler) on QueryConfig, allowing users to easily switch their query compilation strategy to this optimized backend.

DbFun.FastExpressionCompiler · high confidence

DbFun.Core v2.3.1 introduces multi-database support and expression-based compilation

This release of the DbFun.Core library adds support for connecting to multiple databases simultaneously via the new IConnector abstraction and DbCall workflow, allowing users to manage distinct connection keys and transactions across different data sources. It also introduces an extensible ICompiler interface with a default LinqExpressionCompiler implementation, enabling more flexible and potentially faster query generation. Additionally, the library now supports discriminated unions with fields and includes improved configuration builders for parameter and result mapping.

DbFun.Core · high confidence

Firebird batch processing support

The DbFun.Firebird library now supports batch processing for Firebird databases. This change introduces new types and builders (BatchCommand, BatchParams) that allow users to execute multiple records in a single batch operation, improving performance for bulk data operations. The implementation includes parameter mapping and compiler integration specific to the Firebird client library.

DbFun.Firebird · high confidence

Initial release of DbFun, a functional F\# data access library

DbFun is introduced as a successor to SqlFun, providing a type-safe, high-performance way to write data access code in F\# using raw SQL. The library includes a core package (DbFun.Core) and specific extensions for MS SQL, PostgreSQL, Oracle, Firebird, MySQL (via MySqlConnector), and SQLite. Key features include support for record, tuple, and discriminated union parameters and results, bulk import mechanisms, array parameters, and a FastExpressionCompiler to improve startup time.

(repo-wide) · high confidence

Initial release of DbFun.MsSql with Table-Valued Parameter support

This entry introduces the DbFun.MsSql library (version 2.3.1), providing Microsoft SQL Server-specific implementations for the DbFun core. Key capabilities include support for Table-Valued Parameters (TVPs) to handle collections of records and tuples efficiently, configurable output parameter builders for stored procedure return values, and a query builder that allows disabling prototype calls to improve performance. The library also includes assembly metadata and specific parameter builders for SQL Server data types.

DbFun.MsSql · high confidence

MySqlConnector bulk copy support

The DbFun.MySqlConnector package now includes a new BulkCopy module that enables high-performance bulk import of records into MySQL tables. This feature introduces BulkCopyBuilder and BulkCopyParams types, allowing users to generate functions that write sequences of records to a specified database table using the underlying MySqlConnector library.

DbFun.MySqlConnector · high confidence

New DbFun.TestTools library with mock infrastructure and templating helpers

The DbFun.TestTools library has been introduced to provide testing utilities for the DbFun data access layer. It includes a comprehensive mocking module that implements IDataReader, IDataParameterCollection, and IDbCommand mocks to simulate database interactions, along with helper functions to set up command output parameters and validate parameter types. Additionally, it provides a templating module with functions to generate SQL WHERE, ORDER BY, JOIN, and GROUP BY clauses, and a models module defining sample domain types such as User, Account, and various discriminated unions for testing purposes.

DbFun.TestTools · high confidence

Oracle-specific bulk copy and array parameter support

The DbFun.OracleManaged library now includes dedicated support for Oracle-specific database operations. Users can perform high-performance bulk imports into Oracle tables using the new BulkCopyBuilder, which leverages OracleBulkCopy. Additionally, the library introduces native support for Oracle array parameters, allowing sequences, lists, and arrays to be passed as bind variables in queries via the Params module and QueryConfig.UseOracleArrayParams() method.

DbFun.OracleManaged · high confidence

PostgreSQL array support and bulk import capability

The Npgsql provider now supports PostgreSQL arrays in both query parameters and result sets, allowing users to pass and receive F\# sequences, lists, and arrays of simple types (such as integers, strings, and dates) as native Postgres arrays. Additionally, a new bulk import feature has been added, enabling high-performance batch data insertion via the PostgreSQL COPY command.

DbFun.Npgsql · high confidence

Test coverage

42 commits adding/updating tests in DbFun.Sqlite.IntegrationTests/database; Added Firebird integration tests for basic CRUD and batch operations; Added MySQL integration tests for DbFun; Added Npgsql integration tests for PostgreSQL array support and bulk imports; Added SQL Server database schema for integration tests; Added integration tests for MySqlConnector data access; Added integration tests for Oracle Managed Data Provider; Added integration tests for SQLite database operations; Added integration tests for multi-database operations; Added tests for MsSql parameter handling and query execution; Initial integration test suite for MsSql provider; Initial test suite for DbFun.Core database operations.

Dependencies

Update database driver dependencies to address vulnerabilities

This release updates several database driver packages to their latest versions to resolve known security vulnerabilities. Microsoft.Data.SqlClient has been upgraded to 5.1.3, Npgsql to 8.0.3, and Oracle.ManagedDataAccess.Core to 23.6.0. Additionally, the project now references MySqlConnector 2.3.1 and System.Data.SQLite 1.0.118, ensuring compatibility with the latest stable releases across supported database providers.

(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 65 → 62 (-2.2)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 85 → 85 (+0.0)
  • Architecture 96 → 98 (+2.3)
  • Maturity 59 → 56 (-3.5)
  • Readiness 58 → 58 (+0.0)
  • Security 75 → 69 (-6.1)

New (2)

  • Documentation: no architecture or design documentation (README.md)
  • Orphaned files with no living knowledge

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

Survey your own repository

jacentino/DbFun 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 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9b7038619d245e613d1d68ea31879ff93c28e29d — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.