#include <connection.hxx>
Inheritance diagram for pqxx::connection:
Public Member Functions | |
connection () | |
Constructor. Sets up connection without connection string. | |
connection (const PGSTD::string &ConnInfo) | |
Constructor. Sets up connection based on PostgreSQL connection string. | |
connection (const char ConnInfo[]) | |
Constructor. Sets up connection based on PostgreSQL connection string. | |
virtual | ~connection () throw () |
This is the class you typically need when you first work with a database through libpqxx. Its constructor immediately opens a connection. 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. Most of the documentation that you'll need to use this class is in its base class, connection_base.
The advantage of having an "immediate" connection (represented by this class) is that errors in setting up the connection will probably occur 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 connection_base interface defined in connection_base.hxx. All features of any interest to client programmers are defined there.
|
Constructor. Sets up connection without connection string. Only default values will be used, or if any of the environment variables recognized by libpq (PGHOST etc.) are defined, those will override the defaults. |
|
Constructor. Sets up connection based on PostgreSQL connection string.
|
|
Constructor. Sets up connection based on PostgreSQL connection string.
|
|
|