I would like to announce the release of Caqti 2.3.0.
TL;DR: Consider adding the caqti.classic to your link line (available since this version). It currently only re-exports the caqti library, but will be replaced by a compatibility layer for the Caqti 2 API in Caqti 3 to allow incremental migration.
Release Notes
Note that some of the new features of this release are only accessible
through the still unstable caqti.template library, which will soon be
stabilized as part of an upcoming Caqti 3 API. Due to adjustments to module
names, switching to caqti.template will not ensure future compatibility.
Instead, users are encouraged to add the new caqti.classic to their
dependencies to ease migration to Caqti 3.
-
Added an alias
caqti.classicfor thecaqtilibrary. This will be
turned into a library providing compatibility with the current Caqti 2
API when Caqti 3 is released. The two APIs can be used side-by-side to
allow incremental migration. -
The dialect descriptor for MariaDB in
caqti.templatenow provides the
server version. -
Added
Query.parens,Query.litf,Query.vars,Row_type.fieldsto
thecaqti.templatelibrary. -
Revised the interface for creating row types to allow instantiating
parametric types applicatively. Before this change, each application of
a function representing a parametric type would generate a new type ID
even when applied to the same type parameter argument. The key part of
this interface is theCaqti_template.Constructor_typemodule. -
The query functions provided to request templates are now memoized, so
that they are only called once per dialect. This is meant as an
optimization; it’s still good practise to avoid side-effects here. -
The new function
Query.with_pos_ofallows query generators to add
source locations to the syntax tree, which will be emitted as SQL
comments in the query string if theenable_query_annotationsis set.
This should simplify debugging when the query is assembled from
different parts of the application code. -
The still unstable
caqti.templatelibrary now supports multiple
statements in a single request template, sent opportunistically as a
single query where allowed. This is still experimental. -
Fixed package scoping of shim rules for sqlite3 (#133 by mefyl).
-
Fixed the error classification for the SQLite3 driver (#132).
-
Fixed reconnect after connection loss for PostgreSQL.