Skip to content

2.1.0

Latest

Choose a tag to compare

@balat balat released this 13 Jun 09:33
· 7 commits to master since this release
63125df

New features:

  • Type-safe JSON serialisation via Deriving_Json: new modules Store_json, Ref_json and functor Column.Json in all backends, as alternatives to the Marshal-based Store, Ref and Column.Marshal. Persisted data is human-readable and stable across OCaml versions. Adds a dependency on js_of_ocaml (for the Deriving_Json runtime only).
  • iter and fold added to the Polymorphic interface; iter_step/fold_step deprecated.
  • iter_batch implemented for the SQLite and DBM backends.

Bug fixes:

  • SQLite: keep a persistent database connection instead of open/close per operation.
  • PostgreSQL: fix replace_if_exists, wrap modify_opt in a transaction, fix Functorial.length and Functorial.fold/Polymorphic.fold.
  • DBM: replace the double-fork with Unix.create_process (OCaml 5 compatible).

Security:

  • Validate table and store names in all backends to prevent SQL injection.

Other:

  • Add a test suite for the three backends and a CI workflow.

This release is fully backward-compatible with 2.0.0 (additive API).