#include <basic_connection.hxx>
Inheritance diagram for pqxx::basic_connection< CONNECTPOLICY >:
Public Member Functions | |
basic_connection () | |
basic_connection (const PGSTD::string &opt) | |
basic_connection (const char opt[]) | |
~basic_connection () throw () | |
const PGSTD::string & | options () const throw () |
Combines connection_base (the highly complex class implementing essentially all connection-related functinality) with a connection policy (a simpler helper class determining the rules that govern the process of setting up the underlying connection to the backend).
The pattern used to combine these classes is the same as for basic_transaction. Through use of the template mechanism, the policy object is embedded in the basic_connection object so that it does not need to be allocated separately. At the same time this construct avoids the need for any virtual functions in this class, which reduces risks of bugs in construction and destruction; as well as any need to templatize the larger body of code in the connection_base class which might otherwise lead to unacceptable code duplication.
pqxx::basic_connection< CONNECTPOLICY >::basic_connection | ( | ) |
pqxx::basic_connection< CONNECTPOLICY >::basic_connection | ( | const PGSTD::string & | opt | ) | [explicit] |
pqxx::basic_connection< CONNECTPOLICY >::basic_connection | ( | const char | opt[] | ) | [explicit] |
pqxx::basic_connection< CONNECTPOLICY >::~basic_connection | ( | ) | throw () |
const PGSTD::string& pqxx::basic_connection< CONNECTPOLICY >::options | ( | ) | const throw () |