fsprojects/Rezoom.SQL
71.7
Strong · 23 September 2026
32.7k
lines of production code
F#
primary language
5
measurements over time
What this system is
Rezoom.SQL is a .NET library that generates type-safe ADO.NET data access code from SQL, supporting multiple backends including PostgreSQL, SQL Server, and SQLite. It enables developers to map custom CLR types to database columns and query results through a robust type provider and configuration-driven mapping system. The system includes comprehensive tooling, documentation, and demo applications to facilitate integration and testing.
How it got here
2016–2017 — Initial release and compiler overhaul
23 changes.
This period marks the initial release of Rezoom.SQL, featuring a complete rewrite of the SQL compiler with a new Abstract Syntax Tree and type inference system. The project established comprehensive documentation, demo applications, and multi-database support for SQLite, Postgres, and TSQL.
2019–2026 — User type support and tooling
10 changes.
This period focused on expanding the type provider's capabilities for custom user-defined types across SQL Server and PostgreSQL backends, including JSON, geography, and point data. It also introduced comprehensive test coverage for these mappings and automated build and documentation tooling to streamline package distribution and site generation.
Features
Add API endpoints for saving and retrieving SQL fiddles
A new FiddleApiController has been added to the SQLFiddle demo site, exposing REST endpoints to save and retrieve SQL fiddles. The controller implements POST /api/save for persisting fiddle state and GET /api/get/{id} for retrieving them, utilizing the Rezoom SQL connection provider and Newtonsoft.Json for serialization.
demos/SQLFiddle/SQLFiddle.Website/Controllers · high confidence
Add EF Core implementation of the FileSystem demo
A new C\# implementation of the FileSystem demo has been added under \demos/FileSystem/FileSystem.EFVersion\. This mirrors the existing F\# version but uses Entity Framework Core for data access, including entity classes, a DbContext, a persistence layer, domain logic, and a REPL interface. The addition allows users to compare the round-trip count and performance of the EF Core approach against the original F\# implementation.
demos/FileSystem · high confidence
Add Postgres support and tests for the Type Provider
The TypeProviderUsers project now includes a dedicated Postgres implementation, introducing a new \TypeProviderUser.Postgres\ module. This adds Postgres as a supported database backend, enabling users to run the type provider against a live Postgres instance. The change includes the necessary configuration files (\appsettings.json\, \rzsql.json\) and a comprehensive suite of tests (\Shared.fs\, \TestMigrateConnectionString.fs\, \TestSelects.fs\, \TestUserPrimitivePoint.fs\, \TestUserPrimitiveSystemObject.fs\) that verify database migrations, query execution, and the handling of custom user-defined types (such as \Point2D\ and \Address\) over the Postgres backend.
src/TypeProviderUsers/TypeProviderUser.Postgres · high confidence
Add T-SQL user-defined types for JSON and Geography
Added new type provider mappings for SQL Server, introducing support for native JSON storage and 2D geographic locations. The Address type serializes to and from JSON strings, while GeoLocation maps to the SQL Server geography type, handling the conversion between WKT strings for writes and SqlGeography objects for reads.
TypeProviderUser.TSQL.UserTypes · high confidence
Add documentation for configuration, migration trees, and user types
Added new documentation pages for the Configuration section, including a guide on runtime configuration, the rzsql.json file format, and migration trees. Also added documentation for the UserTypes feature, covering advanced primitive mapping, annotation attributes, field lengths, and pitfalls.
doc/Configuration · high confidence
Add railroad diagrams for SQL syntax
Added new SVG railroad diagrams for SQL syntax elements, including ALTER TABLE, COLUMN\_CONSTRAINT, COLUMN\_DEF, COLUMN\_NAME, COMMON\_TABLE\_EXPRESSION, COMPOund\_EXPR, CREATE\_TABLE, CREATE\_VIEW, and DELETE\_STMT. These visual representations provide a clearer understanding of the structure and components of these SQL statements.
doc/Language/Diagrams · high confidence
Added SQLFiddle demo solution file
A new solution file (SQLFiddle.sln) was added to the demos/SQLFiddle directory, defining the build configuration for the SQLFiddle and SQLFiddle.Website projects. This change establishes the build structure for the SQLFiddle demo site, which is currently marked as a work in progress.
demos/SQLFiddle · medium confidence
Adds SQLite test project for the Type Provider User (TPU) feature
A new SQLite-specific test project (TypeProviderUser.SQLite) has been added to exercise the Type Provider User (TPU) feature. The project includes a database schema (V1.model.sql) and a suite of end-to-end tests covering user-defined types (FileHash, FavoriteColor, DateTimeKind), custom primitive mappings (TimeOnly, CompactInt), and row-type interface generation (SELECT with interfaces, MANY/ONE/OPTIONAL navigation). It also validates parameter binding for complex types and verifies that generated row types implement the expected interfaces.
src/TypeProviderUsers/TypeProviderUser.SQLite · high confidence
Adds attributes and runtime support for custom primitive mapping and blueprint configuration
Users can now annotate user-defined types with attributes like RawBackendSQLTypeAttribute, SQLParameterDbTypeAttribute, and SQLTypeLengthAttribute to control SQL data types, parameter types, and lengths. The Rezoom.SQL.Mapping library introduces Blueprint attributes (BlueprintConstructorAttribute, BlueprintKeyAttribute, etc.) to configure entity mapping, and provides asynchronous execution extension methods (Execute, ExecuteScalar, ExecuteExactlyOne) for commands. Additionally, the Backend type is updated to support dialect identification and runtime handling for SQL Server, SQLite, PostgreSQL, and TSQL, with specific handling for empty IN lists and connection-specific behaviors.
src/Rezoom.SQL.Mapping · high confidence
Automated build and documentation tooling for package and doc navigation
Added PowerShell scripts to automate the packaging of Rezoom.SQL packages and their parent libraries into a local NuGet feed, including a new pack-dev.ps1 for prerelease builds, pack-parents.ps1 for parent dependencies, and pack-release.ps1 for release builds. Additionally, a new regen-doc-nav.ps1 script was added to automatically regenerate breadcrumb navigation, prev/next links, and Just-the-Docs YAML frontmatter for all documentation pages based on SUMMARY.md.
build · high confidence
Comprehensive language documentation for RZSQL
Added extensive documentation for the RZSQL language, covering core SQL constructs including data types, literals, expressions, and all major statement types (SELECT, INSERT, UPDATE, DELETE, CREATE/ALTER/DROP). The new docs also cover advanced features such as Common Table Expressions, Dynamic SQL, Navigation Properties, and Vendor Statements, providing users with detailed syntax diagrams and backend-specific behavior notes.
doc/Language · high confidence
Initial release of Rezoom.SQL with comprehensive documentation and developer tooling
The repository is initialized with version 1.1.0, introducing the 'UserTypes' feature that allows mapping database columns and query parameters to custom .NET types. The release includes extensive documentation for the SQL dialect, configuration, and API, alongside a new developer workflow featuring centralized versioning via Directory.Build.props and PowerShell scripts for local package development. The project also establishes an AI agent policy, a MIT license, and a Just-the-Docs based documentation site, while removing legacy Travis CI and ConfigurationManager dependencies.
(repo-wide) · high confidence
Introduce Fiddle data models for SQLFiddle
Added the core data models for the SQLFiddle demo, defining the structure for fiddles including backend selection (SQLite, TSQL, Postgres), input/output types, and error handling. This establishes the internal representation for saving, loading, and type-checking SQL fiddles.
SQLFiddle · high confidence
Introduce SQLFiddle demo with save/load and multi-backend support
The SQLFiddle demo application is introduced, providing a way to save, load, and validate SQL fiddles. The demo now supports multiple SQL backends (SQLite, TSQL, Postgres) and includes persistence logic to store and retrieve fiddle data, along with a database schema for the Fiddles table.
demos/SQLFiddle/SQLFiddle · medium confidence
Introduce configuration-driven connection management and user type mapping infrastructure
The Rezoom.SQL.Mapping library now supports resolving database connections via Microsoft.Extensions.Configuration (e.g., appsettings.json) through a new ConfigurationConnectionProvider, removing the dependency on the legacy System.Configuration.ConfigurationManager. Additionally, the library introduces a comprehensive type system for mapping user-defined CLR types to SQL primitives, including a Blueprint model for entity readers, a FreezeDry mechanism for serializing user type metadata for runtime rehydration, and support for custom SQL parameter types and raw SQL fragments in command generation.
Rezoom.SQL.Mapping · high confidence
Introduce domain types and demo setup for the FileSystem application
The FileSystem demo application now includes a new Common.fs file that defines core domain types, including strongly typed IDs (UserId, FileId, FolderId, GroupId, RecycleItemId) and a hierarchical permission system supporting Allow, Deny, and Inherit states. It also introduces data structures for files, folders, and effective permissions, along with a demo setup module that seeds the database with a sample folder structure, users, groups, and permissions to demonstrate the application's functionality.
FileSystem · high confidence
Introduce interface implementation for generated row types
The provider now generates row types that implement specific interfaces, enabling more robust type-safe access to query results. This change adds new files (InterfaceImpls.fs and TypeGeneration.fs) that handle the logic for mapping SQL columns to interface properties, including support for optional and collection types, and ensures that generated row types correctly implement the expected interfaces for use in user code.
Rezoom.SQL.Provider · high confidence
New user-type definitions and extension methods for SQL mapping
A new Library.fs file introduces user-defined types and extension methods to support advanced type-provider features. This includes single-case DU types (CompactInt, ShortName) annotated with SQL type attributes, enum mapping strategies for both custom and BCL enums, and extension methods for BCL types like TimeOnly and DateTimeOffset. Additionally, several interface definitions (IUserSummary, IArticleHeader, etc.) are added to support row-type implementation tests.
TypeProviderUser.UserTypes · high confidence
Rezoom.SQL.Compiler: New AST mapping and type-checking infrastructure
The Rezoom.SQL.Compiler module has been restructured with new files for AST mapping, aggregate checking, and default backend translation. The ASTMapping module provides a generic mechanism for transforming SQL ASTs between different type systems, while the AggregateChecker enforces SQL rules about mixing aggregate and non-aggregate expressions. The DefaultBackend and its associated translators (DefaultExprTranslator, DefaultStatementTranslator, DefaultLiteralTranslator) provide a baseline SQL generation implementation. Additionally, error handling has been formalized with specific error codes (SQ000-SQ026) for parsing and type-checking issues.
src/Rezoom.SQL.Compiler · high confidence
Support for custom Postgres user types (JSONB and Point)
The Postgres user types library now includes definitions for mapping custom CLR types to Postgres backend types. Specifically, an \Address\ type is mapped to Postgres \jsonb\ using \System.Object\ as the underlying CLR type, serializing to/from JSON strings. Additionally, a \Point2D\ type is mapped to Postgres \point\ using \NpgsqlTypes.NpgsqlPoint\ as the underlying CLR type, allowing native handling of 2D point data. These changes enable the type provider to handle these specific Postgres data types in user-defined schemas.
TypeProviderUser.Postgres.UserTypes · high confidence
Behavioural changes
Added visual diagrams for sequential and concurrent execution
Added Graphviz (.gv) source files that illustrate the difference between sequential and concurrent execution flows. The new diagrams visually map out the order of operations for 'threeTrip' and 'twoTrip' queries, helping users understand the execution patterns.
doc/ReadmeResources · high confidence
Complete overhaul of the SQL compiler's internal model and type system
The Rezoom.SQL.Compiler module has been completely rewritten, introducing a new Abstract Syntax Tree (AST) structure and a robust type inference system. This change replaces the previous implementation with a fully generic AST (AST\<'t, 'e\>) that carries type information through the compilation pipeline, enabling stricter type checking and more accurate error messages. The new architecture separates the inferred type state (InferredTypes) from the final compiled types (ExprInfo), allowing for better tracking of nullability, column references, and function invocations. This refactor supports more complex SQL features, including better handling of user-defined types, improved migration tracking, and more precise error reporting for invalid SQL constructs.
Rezoom.SQL.Compiler · high confidence
Improved assembly resolution for the F\# type provider
The Rezoom.SQL.Provider now resolves assemblies more reliably during compilation, particularly in Visual Studio and IDE tooling. The provider now installs a static assembly resolver that prefers already-loaded assemblies, then falls back to the NuGet package cache, and finally to the project's referenced assemblies. This change fixes issues where the provider failed to load required libraries at compile time.
src/Rezoom.SQL.Provider · high confidence
Rezoom.SQl solution file reorganized
The Rezoom.SQL solution file has been updated to reflect the new project structure, including the addition of the Rezoom.SQL.Annotations project and the reorganization of test projects into the Tests group.
src · high confidence
SQLFiddle demo site modernized with .NET 8 and SQLite backend
The SQLFiddle demo application has been updated to run on .NET 8.0, with the underlying database backend switched to SQLite to support Linux hosting. Configuration has been simplified so that the connection provider is automatically resolved from the app's IConfiguration (specifically the 'SQLFiddle' connection string), removing the need for explicit provider specification in the config.
demos/SQLFiddle/SQLFiddle.Website · medium confidence
Update SQLFiddle demo site assets
The SQLFiddle demo site received updated CSS for the layout and a new JavaScript file (ace.js) containing the Ace editor library and its dependencies, which supports the editor's functionality and styling.
demos/SQLFiddle/SQLFiddle.Website/wwwroot · medium confidence
Wider content area and adjusted sidebar width in Just-the-Docs theme
The Just-the-Docs theme's layout has been customized via new SCSS variable overrides. The main content width is increased from the default 800px to 1000px, providing a wider reading area. Additionally, the sidebar navigation width is set to 232px for both desktop and mobile breakpoints, ensuring titles fit comfortably while allowing room for future additions.
_\sass · high confidence
Test coverage
Add TSQL backend test suite for user primitives and raw SQL injection; Add test projects and scripts for SQLite, Postgres, and TSQL type providers; Add user-defined type primitives for SQL mapping tests; Added tests for user type annotations and interface-based row types; Expanded test coverage for SQL compiler, mapping, and backend generation.
Dependencies
Upgrade to .NET 10 and Rezoom 2.0
The project has been upgraded to target .NET 10.0, with most libraries and demo applications now building against this framework. The Rezoom library has been upgraded to version 2.0.0, and the Rezoom.SQL packages have been updated to version 1.1.0, which adds support for custom user-defined types. Additionally, the demo applications (SQLFiddle, FileSystem) and test projects have been updated to use the latest NuGet packages, including FSharp.Core 10.1.300 and Microsoft.Extensions.Configuration 10.0.0.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 69 → 72 (+2.6)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 91 → 89 (-1.6)
- Architecture 94 → 94 (-0.6)
- Maturity 65 → 71 (+6.0)
- Readiness 60 → 60 (+0.0)
- Security 85 → 100 (+14.7)
Resolved (13)
- Bounded contexts not declared
- Code Duplication not included (time budget)
- Dependency hygiene not measured — no packages were read
- High: security finding (details withheld)
- High: security finding (details withheld)
- Off-boarding risk: anonymized user #1
- Split Rezoom.SQL.Annotations
- Test reliability not measured — no test run produced results
- The meta-package README mentions Microsoft.Data.SqlClient but does not state which SQL dialects it supports (e.g., T-SQL vs. PostgreSQL) or how to configure the backend. (Rezoom.SQL.Provider.TSQL/README.md)
- XML-doc coverage: Rezoom.SQL.Provider.Postgres (src/Rezoom.SQL.Provider.Postgres/Rezoom.SQL.Provider.Postgres.csproj)
- XML-doc coverage: Rezoom.SQL.Provider.SQLite (src/Rezoom.SQL.Provider.SQLite/Rezoom.SQL.Provider.SQLite.csproj)
- XML-doc coverage: Rezoom.SQL.Provider.TSQL (src/Rezoom.SQL.Provider.TSQL/Rezoom.SQL.Provider.TSQL.csproj)
- complexity unreadable for .cs, .fs, .py — churn × complexity hotspots could not be measured
New (24)
- Change coupling: ASTMapping.fs ↔ TypeChecker.fs (src/Rezoom.SQL.Compiler/ASTMapping.fs)
- Change coupling: DefaultBackend.fs ↔ SQLite.fs (src/Rezoom.SQL.Compiler/DefaultBackend.fs)
- Change coupling: DefaultBackend.fs ↔ TSQL.fs (src/Rezoom.SQL.Compiler/DefaultBackend.fs)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no licence statement (README.md)
- Documentation: no usage examples (README.md)
- Documentation: no usage examples (README.md)
- FileTooLong: Rezoom.SQL.Compiler/AST.fs (src/Rezoom.SQL.Compiler/AST.fs)
- FileTooLong: Rezoom.SQL.Compiler/DefaultStatementTranslator.fs (src/Rezoom.SQL.Compiler/DefaultStatementTranslator.fs)
- FileTooLong: Rezoom.SQL.Compiler/TypeChecker.fs (src/Rezoom.SQL.Compiler/TypeChecker.fs)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No dependency advisory monitoring
- Projects may be oversized for their cohesion
- TooManyFunctions: Error (src/Rezoom.SQL.Compiler/Error.fs)
- TooManyMethods: ASTMapping`4 (src/Rezoom.SQL.Compiler/ASTMapping.fs)
- TooManyMethods: DefaultStatementTranslator (src/Rezoom.SQL.Compiler/DefaultStatementTranslator.fs)
- TooManyMethods: ReferenceFinder (src/Rezoom.SQL.Compiler/ReadWriteReferences.fs)
- …and 4 more
API surface
- Unchanged — 3 HTTP endpoints
Architecture
- Unchanged — 1 containers · 9 contexts · 3 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fsprojects/Rezoom.SQL 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 a4fabf17894ee403a9edec38b48875b6e5a4dbbe — 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.