I am happy to announce the second release of Caqti this year. The reason for the quick succession is partly an adjustment to the new API for request construction and partly that matchable error conditions did not make it into the previous release. You can see the full release notes below.
I would also like to thank OCaml Software Foundation for sponsoring my efforts on the Caqti project this year, also including most of the work that went into the previous release.
One feature in progress is a new driver based on the pure-OCaml pgx which should make it possible, with some additional changes to the way drivers are loaded, to target MirageOS. I am note sure if this can be done in a minor release or will require a Caqti 2 branch.
A matchable representation of common causes of errors on the database
side is now available, with limitations. It focuses on conditions which
seem most likely useful to handle. At the moment we lack extended error
codes from SQLite3 needed to make the cause fully precise.
Expose the underlying error details from database client libraries.
This is meant to be use as a last resort, and requires directly linking
with the relevant drivers.
A second set of request construction operators
->*were introduced after experience with converting existing code.
Given the parameter and result type they return a function which
constructs a request directly from a query string. Avoiding the need to
@:-simplifies local opens and usage with
Environment variables are now expanded in the debug log when using the
new request constructors introduced in 1.7.0.
?tweaks_versionconnection parameter has been added to control
when the client is ready to adapt to changes in database session
parameters or other adjustments of the interaction with specific
database systems. [More details available in the documentation.]
Enable foreign key constraint checks for SQLite3 starting at tweaks
- Fixed debug logging to pass the correct driver info to the query
callback instead of a dummy driver info which would cause a failure if
-->operator was renamed to
-->!, with a deprecated alias, for
consistency with the new
The old convenience interface for creating requests has been deprecated
in favour of the new infix operators and the new query template parser.
Documented-only deprecations of
Caqti_async_sql_iohave been annotated.
Correction: Enabling of foreign key constraints for SQLite3 starts at tweaks version 1.8 (not 1.7). (Thanks @reynir for noticing!)