2.0.0
CHANGES:
New features:
-
Added driver based on the pure-OCaml PGX library (#38). However, due to
lack of TLS support it is not suitable for production, unless you have a
dedicated secure network. -
Added support for MirageOS. This only works for the PGX driver, since
the other drivers link against external C libraries. -
Added experimental support for Eio, both pure-OCaml and Unix. The
former supports PGX while the latter supports all drivers. -
Implemented single-row mode for PostgreSQL (#24), but while this avoids
uncontrolled memory consumption when a large number of rows is returned,
it is a lot less efficient. -
A new pool connection parameter
?max_idle_age
provides removal
resources from pools which have been unused for the given period. -
Printf-style function
Caqti_query.qprintf
for dynamic queries
(GPR#103, Basile Clément). -
Added general-purpose product type to provide functionality covering
both product and custom types. -
Added new tuple types
t3
, ...,t8
based on the new product type and
deprecatedtup2
,tup3
,tup4
which are now aliases for these.
Breaking changes:
-
The minimal OCaml requirement is now 4.08.0.
-
The connection functions previously found in
caqti-lwt
has been moved
into a sublibrarycaqti-lwt.unix
as part of the addition of
caqti-mirage
, whereas shared functionality remains incaqti-lwt
.
The LWT connection function is therefore now found inCaqti_lwt_unix
. -
Removed all deprecated functionality and a few unintended or
undocumented definitions like the typeCaqti_blocking.future
and
Caqti_driver_info.describe_has_typed_*
. -
Reworked the driver API to accommodate the addition of the PGX driver
and MirageOS and Eio support, and to avoid exposting internal interfaces
in the main library. These modules are now found in the sublibraries
caqti.platform
andcaqti.platform.unix
, depending on their external
depnedencies. They are not meant for use by applications, though this
might not have fully clear previously. -
Removed constructors Custom, Unit, Tup2, Tup3, Tup4 from
Caqti_type.t
.
They were private but could in prinicle be matched against. -
The extensibility of
Caqti_type.Field.t
has been dropped along with
the associated functions for registering conversions. This means that
there are no custom field types any more, only custom row types. The
purpose of custom field types where to support non-standard types for
3rd party drivers; we should coordinate additions to the core type
instead if needed. -
According to the above point, the
caqti-type-calendar
is reimplemented
as a row type, which means theCdate
andCtime
constructors are
gone. -
There are adjustments for the pretty printer for types. (The context is
assumed to start at the lowest precedence, meaning parentheses around
lowest-precedence expressions are dropped. Also,redacted
is shown
with suffix notation, allowing us to remove one precedence level.) -
Moved pool tuning parameters into a configuration object.
Fixes:
-
Fixed a missing
Preemptive.detach
call forto_stream
for Sqlite3. -
Incorrect error reporting related to type conversions were discovered by
exhaustiveness checks when making field types non-extensible.
Other:
-
The documentation of
call
now makes clear that the result must be
retrieved in order to make sure the request is performed. This is made
relevant by the addition of the PGX driver where request and retrieval
are fused. -
Customized the top-level index and some other documentation work.
Removal of private modules from the main library should also help to
make the documentation more accessible. -
Added a benchmark to measure row decoding performance.
-
Improved decoding performance by partially applying the type descriptor.