Need help with ozo?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

147 Stars 35 Forks PostgreSQL License 563 Commits 32 Opened issues


OZO is a C++17 Boost.Asio based header-only library for asyncronous communication with PostgreSQL DBMS.

Services available


Need anything else?

Contributors list


Build Status codecov

What's this

OZO is a C++17 library for asyncronous communication with PostgreSQL DBMS. The library leverages the power of template metaprogramming, providing convenient mapping from C++ types to SQL along with rich query building possibilities. OZO supports different concurrency paradigms (callbacks, futures, coroutines), using Boost.Asio under the hood. Low-level communication with PostgreSQL server is done via libpq. All concepts in the library are designed to be easily extendable (even replaceable) by the user to simplify adaptation to specific project requirements.


Since the project is on early state of development it lacks of documentation. We understand the importance of good docs and are working hard on this problem. Complete documentation is on the way, but now:


For the time OZO is not compatible with new executors models that are used by default since Boost 1.74. The

macro needs to be defined. See Boost 1.74 changelog for the details.


These things are needed:

  • CMake is used as build system
  • GCC or Clang C++ compiler with C++17 support (tested with GCC 7.0, Clang 5.0 and Apple LLVM version 9.0.0)
  • Boost >= 1.66 with
  • libpq >= 9.3
  • Ozo uses the resource_pool library as a git submodule, so in case of using a package version, this dependency should be satisfied too.

If you want to run integration tests and/or build inside Docker container: * Docker >= 1.13.0 * Docker Compose >= 1.10.0


The library is header-only, but if you want to build and run unit-tests you can do it as listed below.

Build and run tests on custom environment

First of all you need to satsfy requirements listed above. You can run tests using these commands.

mkdir -p build
cd build
make -j$(nproc)
ctest -V

Or use which accepts folowing commands:

scripts/ help

prints help.


build and run tests with specified compiler and target, the compiler parameter can be:

  • gcc - for build with gcc,
  • clang - for build with clang.

The target parameter depends on compiler. For gcc:

  • debug - for debug build and tests
  • release - for release build and tests
  • coverage - for code coverage calculation

For clang:

scripts/ all

build all possible configuration.

scripts/ docs

generates documentation.

Build and run tests on MacOS 10.X

For MacOS the best way to satisfy minimum requirements is brew

brew install cmake boost libpq postresql

Build and run tests within Docker

To build code and run tests inside docker container:

scripts/ docker  

To generate documentation using docker container:

scripts/ docker docs

Test against a local postgres

You can use

but add
scripts/ pg  

or if you want build code in docker:

scripts/ pg docker  

This will attempt to launch postgres:alpine from your Docker registry. Or you can point ozo tests to a postgres of your choosing by setting these environment variables prior to building:

export OZO_PG_TEST_CONNINFO='your conninfo (connection string)'

scripts/ gcc debug

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.