A minimalistic general high level API for relational databases
|Version on this page:||0.7.3.2|
|LTS Haskell 20.23:||1.6.3|
|Stackage Nightly 2023-05-31:||1.6.3|
|Latest on Hackage:||1.6.3|
Module documentation for 0.7.3.2
A robust and concise yet powerful API for communication with arbitrary relational databases using SQL.
Concise and crisp API. Just a few functions and two monads doing all the boilerplate job for you.
A powerful transaction abstraction, which provides an automated resolution of conflicts. The API ensures that you're only able to perform a specific set of actions in the transaction context, which allows Hasql to safely resolve conflicting transactions by automatically retrying them. This is much inspired by STM and ST.
Support for cursors. Allows to fetch virtually limitless result sets in a constant memory using streaming.
Employment of prepared statements. Every statement you emit gets prepared and cached. This raises the performance of the backend.
Automated management of resources related to connections, transactions and cursors.
A built-in connection pool.
Compile-time generation of templates. You just can't write a statement with an incorrect number of placeholders.
Ability to map to any types actually supported by the backend.
- Attoparsec-0.13 support
- GHC 7.10 support
- Implement support for free variables by the quasi-quoter
- Relaxed the dependency on “monad-control”
0.7.0 - Refinements and minor updates
- Streaming now is parameterized by the size of a chunk
- Introduced a new type
- Changed the suffix of statement execution functions to
0.6.0 - Major API overhaul
- The connection pool acquisition is now explicit and is no longer handled by the
Sessionmonad. This should provide for a simpler integration with other libraries.
Sessionmonad is now merely a convenience thing for providing a context to multiple transactions. One can run it as many times as he wants - it won’t reestablish any resources any more.
- The connection timeout is now set using
- There are no exceptions any more. All the error-reporting is typed and done explicitly, using
- The error types are now mostly backend-specific.
- The transaction mode is now extended to support uncommittable transactions with the
Txfunctions are now appended with a “Tx” suffix.
maybeTxand updated the semantics of
qstatement quasi-quoter is now renamed to more meaningful
Statementtype is renamed to
Stmtand is now exported from the main API.
RowParseris now uninstantiable. This enforces the idiomatic usage of the library.
- Statement templates now support UTF-8.
- Update the “list-t” and “monad-control” deps
- Fix the transaction conflicts bug