Hasql is a highly efficient PostgreSQL driver and a mapping API. It targets both the users, who need a low level of abstraction, and the users, who face the typical tasks of DB-powered applications, providing them with higher-level APIs.
Hasql is not just a single library, it is a granular ecosystem of composable libraries, each isolated to perform its own task and stay simple.
-
"hasql" - the root of the ecosystem, which provides the essential abstraction over the PostgreSQL client functionality and mapping of values. Everything revolves around that library.
-
"hasql-pool" - a Hasql-specialized abstraction over the connection pool.
-
"hasql-transaction" - an STM-inspired composable abstraction over the database transactions with the automated conflict resolution.
-
"hasql-cursor-query" - a declarative abstraction over cursors.
-
"hasql-cursor-transaction" - a lower-level abstraction over cursors, which however allows to fetch from multiple cursors simultaneously. Generally though "hasql-cursor-query" is the recommended alternative.
-
"hasql-th" - Template Haskell utilities, such as getting SQL from external files at compile-time. It's planned to extend this library to provide a compile-time checking of the SQL-syntax correctness.
-
"hasql-migration" - an abstraction over the migration strategies.