SqlHydra is a type-safe SQL generation and code generation suite for F# that creates strongly-typed queries from your database schema.
SqlHydra is a suite of NuGet packages for F# that generates strongly-typed record types from database schemas and provides a type-safe query builder using computation expressions. It solves the problem of runtime SQL errors by ensuring all queries are checked at compile time, while supporting multiple databases including SQL Server, PostgreSQL, SQLite, Oracle, and MySQL.
F# developers building data-driven applications who want type-safe database interactions without sacrificing SQL expressiveness, and teams looking to eliminate runtime SQL errors through compile-time validation.
Developers choose SqlHydra for its seamless integration with F#'s type system, providing full IntelliSense and compile-time safety for database queries, while maintaining the flexibility to write complex SQL operations through an intuitive computation expression syntax.
SqlHydra is a suite of NuGet packages for working with databases in F# including code generation tools and query expressions.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates F# record types from the database schema and uses computation expressions to ensure all queries are type-checked at compile time, eliminating runtime SQL errors as highlighted in the README's philosophy.
Works with SQL Server, PostgreSQL, SQLite, Oracle, and MySQL, providing a consistent API across different database providers, as listed in the supported databases section.
Supports a wide range of operations including SELECT, INSERT, UPDATE, DELETE, JOINs, aggregates, subqueries, and database-specific functions through built-in extensions, detailed in the query examples.
Allows custom database-to-CLR type mappings via the IExtendTypeMapping interface, enabling support for specialized column types like PostgreSQL enums or arrays, as explained in the extensibility section.
Query results cannot be transformed directly in the select clause; developers must use mapList/mapArray, which the README warns can throw errors if done incorrectly, adding complexity for simple projections.
Requires running a CLI tool to generate types from the database schema, and this process must be repeated on schema changes, adding a step to the workflow that isn't needed in runtime-only libraries.
As a niche F# library, it lacks the extensive documentation, community support, and third-party integrations available in more established ORMs like Entity Framework, which might limit troubleshooting.
Features like upserts are handled differently per database (e.g., SQL Server uses a custom TRY/CATCH pattern instead of standard MERGE), requiring developers to learn provider-specific nuances.