ASIO PQ is a C++14 library which provides composed asynchronous operations against a PostgreSQL server over either TCP/IP or Unix domain sockets.
- Create an
asio_pq::connectionobject (this is an RAII wrapper around aPGconn *which also binds in aboost::asio::io_serviceand provides theget_io_service()method - Dispatch a connection attempt with
asio_pq::async_connect - On successful completion call
PQsetnonblockingto enable non-blocking mode - Begin a command as usual for asynchronous command processing
- Call
asio_pq::async_get_resultto asynchronously obtain anasio_pq::resultobject (this is an RAII wrapper around aPGresult *)
connectionresult
async_connectasync_get_resultcancel
- Boost 1.58.0+
Other libraries are depended on, but are header only and are downloaded by CMake:
- Beast
- Catch
- MPark Variant
- Clang 4+ or GCC 6.2.0+ or Microsoft Visual C++ 2017+
- CMake 3.5+
- libpq
See unit tests.