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::connection
object (this is an RAII wrapper around aPGconn *
which also binds in aboost::asio::io_service
and provides theget_io_service()
method - Dispatch a connection attempt with
asio_pq::async_connect
- On successful completion call
PQsetnonblocking
to enable non-blocking mode - Begin a command as usual for asynchronous command processing
- Call
asio_pq::async_get_result
to asynchronously obtain anasio_pq::result
object (this is an RAII wrapper around aPGresult *
)
connection
result
async_connect
async_get_result
cancel
- 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.