I'm happy to announce version 2.0 of PG'OCaml, a library offering type-safe access to PostgreSQL databases for OCaml applications.

This version no longer depends on Batteries, which hopefully will entice more Core users to give it a spin. Below is the list of the remaining changes, straight from the changelog:

  • Dario Teixeira and Jacques-Pascal Deplaix: fixing issues with arrays. This requires all array types to change from 'a array to 'a option array, which breaks backward compatibility.
  • Dario Teixeira's patch making PostgreSQL's NUMERIC type be converted to/from OCaml strings. This change is not backward's compatible, requiring a bump in the major version number (though there seems to be no actual code in the wild relying on the previous behaviour).
  • Dario Teixeira's patch adding function 'uuid', which exposes the unique connection handle identifier.
  • Jacques-Pascal Deplaix's patches adding 'catch', 'transact', 'alive', 'inject', and 'alter' functions.

Note that a couple of changes break backward compatibility, hence the new major version number. These changes were required to fix some long-standing issues, so I trust you'll be understanding.

This new release should be hitting OPAM soon. Alternatively, you can grab the source from the project's homepage. Happy hacking!