Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

pqxx::Connection Class Reference

Connection class; represents an immediate connection to a database. More...

#include <connection.h>

Inheritance diagram for pqxx::Connection:

pqxx::ConnectionItf List of all members.

Public Member Functions

 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.


Detailed Description

Connection class; represents an immediate connection to a database.

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 actual connection to the database until it's actually needed; the LazyConnection class implements such "lazy" behaviour.

The advantage of having an immediate connection is that errors in setting up the connection will 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 ConnectionItf interface defined in connectionitf.h. All features of any interest to client programmers are defined there.


Constructor & Destructor Documentation

pqxx::Connection::Connection const PGSTD::string &    ConnInfo [explicit]
 

Constructor. Sets up connection based on PostgreSQL connection string.

Parameters:
ConnInfo a PostgreSQL connection string specifying any required parameters, such as server, port, database, and password.

pqxx::Connection::Connection const char    ConnInfo[] [explicit]
 

Constructor. Sets up connection based on PostgreSQL connection string.

Parameters:
ConnInfo a PostgreSQL connection string specifying any required parameters, such as server, port, database, and password. As a special case, a null pointer is taken as the empty string.


The documentation for this class was generated from the following files:
Generated on Mon Mar 17 22:59:05 2003 for libpqxx by doxygen1.3-rc3