CircleCI Coverage Status

PGX is a pure-OCaml PostgreSQL client library, supporting Async, LWT, or synchronous operations.

This is an early release. The API is likely to change significantly before the 1.0 release.

This library focuses on correctness and safety, with features like:

We also provide a relatively high-level interface, like Pgx_async.execute_pipe, which prepares a statement, executes it with the given parameters, returns an Async.Pipe.Reader.t (so you can stream results), and unprepares the statement when the query is finished.

Significant portions of the code come from PG'Ocaml.

Setup

opam pin add pgx https://github.com/arenadotio/pgx.git

Examples

See pgx_async/bin/pgx_async_example.ml.