A lightweight, generic F# database abstraction for safer and more succinct ADO.NET interactions.
Donald is a lightweight, generic F# library that provides a type-safe abstraction over ADO.NET for database interactions. It simplifies data access by offering a succinct, functional API that works with any ADO-compatible database, such as SQL Server, SQLite, MySQL, or PostgreSQL. The library aims to reduce boilerplate code, improve safety with type-safe queries, and enhance performance through optimized data reading.
F# developers who need a simple, type-safe way to interact with databases using ADO.NET, without the complexity of a full ORM. It's ideal for those working in .NET ecosystems who prefer functional programming patterns.
Developers choose Donald for its minimal overhead, full ADO.NET compatibility, and functional API that eliminates common pain points like manual parameter handling and object mapping. Its focus on performance and detailed error context makes it a reliable alternative to heavier ORMs.
A lightweight, generic F# database abstraction.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with any ADO.NET implementation, including SQL Server, SQLite, MySQL, and PostgreSQL, as explicitly stated in the design goals to support all ADO implementations.
Uses SqlType for parameter handling and provides Read* extension methods for IDataReader, ensuring compile-time safety and reducing runtime errors, as shown in the command parameters and reading values sections.
Includes asynchronous versions of all core operations like Db.Async.query and Db.Async.exec, facilitating non-blocking data access in modern F# applications, highlighted in the quick start examples.
Defaults to CommandBehavior.SequentialAccess for efficient streaming of large result sets, with noted performance benefits for CLOB/BLOB data, as explained in the performance section of the README.
Requires writing all SQL commands manually without built-in query generation, increasing boilerplate and potential for SQL injection if not parameterized, though SqlType helps mitigate this.
Designed exclusively for F#, making it inaccessible for C# or other .NET language projects, which limits adoption in mixed-language teams or legacy codebases.
The default CommandBehavior.SequentialAccess mandates reading columns in the exact order of the SELECT clause, which can be error-prone and requires careful query construction, as cautioned in the performance nuances.