A robust and concise yet powerful API for communication with arbitrary
relational databases using SQL.
Features:
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.
Streaming now is parameterized by the size of a chunk
Introduced a new type Ex
Changed the suffix of statement execution functions to Ex
0.6.0 - Major API overhaul
The connection pool acquisition is now explicit and is no longer handled by the Session monad. This should provide for a simpler integration with other libraries.
The Session monad 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 Int for simplicity.
There are no exceptions any more. All the error-reporting is typed and done explicitly, using Either.
The error types are now mostly backend-specific.
The transaction mode is now extended to support uncommittable transactions with the TxWriteMode type.
All Tx functions are now appended with a “Tx” suffix.
Added vectorTx and maybeTx and updated the semantics of singleTx.
q statement quasi-quoter is now renamed to more meaningful stmt.
The Statement type is renamed to Stmt and is now exported from the main API.
RowParser is now uninstantiable. This enforces the idiomatic usage of the library.