pqxx::connect_async Class Reference

Asynchronous connection policy; connects "in the background". More...

#include <connection.hxx>

Inheritance diagram for pqxx::connect_async:

Public Member Functions

 connect_async (const std::string &opts)
virtual handle do_startconnect (handle) override
virtual handle do_completeconnect (handle) override
virtual handle do_dropconnect (handle) noexcept override
virtual bool is_ready (handle) const noexcept override
- Public Member Functions inherited from pqxx::connectionpolicy
 connectionpolicy (const std::string &opts)
virtual ~connectionpolicy () noexcept
const std::string & options () const noexcept
virtual handle do_disconnect (handle orig) noexcept

Additional Inherited Members

- Public Types inherited from pqxx::connectionpolicy
using handle = internal::pq::PGconn *
- Protected Member Functions inherited from pqxx::connectionpolicy
handle normalconnect (handle)

Detailed Description

Asynchronous connection policy; connects "in the background".

Connection is initiated immediately, but completion is deferred until the connection is actually needed.

This may help performance by allowing the client to do useful work while waiting for an answer from the server.

Constructor & Destructor Documentation

◆ connect_async()

pqxx::connect_async::connect_async ( const std::string &  opts)

The parsing of options is the same as in libpq's PQConnect See:

Member Function Documentation

◆ do_completeconnect()

pqxx::connectionpolicy::handle pqxx::connect_async::do_completeconnect ( handle  orig)

◆ do_dropconnect()

pqxx::connectionpolicy::handle pqxx::connect_async::do_dropconnect ( handle  orig)

Reimplemented from pqxx::connectionpolicy.

Referenced by do_startconnect().

◆ do_startconnect()

pqxx::connectionpolicy::handle pqxx::connect_async::do_startconnect ( handle  orig)

◆ is_ready()

bool pqxx::connect_async::is_ready ( handle  h) const

Reimplemented from pqxx::connectionpolicy.

The documentation for this class was generated from the following files: