#include <connection.hxx>
Inheritance diagram for pqxx::connect_direct:
Public Member Functions | |
connect_direct (connection_base &c) |
This is the policy you typically need when you first work with a database through libpqxx. It opens a connection immediately. Another option is to defer setting up the underlying connection to the database until * it's actually needed; the lazyconnection class implements such "lazy" behaviour.
The advantage of having an "immediate" connection (represented by this class) is that errors in setting up the connection will occur as exceptions during construction of the connection object, rather than at some later point further down your program.
This class is a near-trivial implementation of the connectionpolicy_base interface defined in connection_base.hxx. All features of any interest to client programmers are defined there.
|
|