Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::SQLConnection Class Reference
[SQL Database library]

SQL Database connection. More...

#include <psqlconnection.h>

List of all members.

Public Member Functions

 SQLConnection (SQLDriver *drv, const std::string &user, const std::string &passwd, const std::string &db, const std::string &host) throw (SQLError)
 Connection ctor.

 ~SQLConnection () throw ()
void open () throw (SQLError)
 Open connection to database.

void close () throw ()
 Close connection to database.

void commit () throw (SQLError)
 Commit transaction.

void rollback () throw (SQLError)
 Rollback transaction.

bool isValid () const throw ()
 Returns true if the connection is valid.

SQLDriverdriver () const throw ()
SQLDriver::ConnectionHandlehandle () const throw ()


Detailed Description

SQL Database connection.

Definition at line 34 of file psqlconnection.h.


Constructor & Destructor Documentation

P::SQLConnection::SQLConnection SQLDriver drv,
const std::string &  user,
const std::string &  passwd,
const std::string &  db,
const std::string &  host
throw (SQLError)
 

Connection ctor.

Initializes the connection object and then tries to connect using the given database description.

P::SQLConnection::~SQLConnection  )  throw ()
 


Member Function Documentation

void P::SQLConnection::close  )  throw ()
 

Close connection to database.

Closes the connection to the database if connected.

void P::SQLConnection::commit  )  throw (SQLError)
 

Commit transaction.

SQLDriver* P::SQLConnection::driver  )  const throw () [inline]
 

Definition at line 68 of file psqlconnection.h.

SQLDriver::ConnectionHandle* P::SQLConnection::handle  )  const throw () [inline]
 

Definition at line 71 of file psqlconnection.h.

bool P::SQLConnection::isValid  )  const throw ()
 

Returns true if the connection is valid.

void P::SQLConnection::open  )  throw (SQLError)
 

Open connection to database.

Opens a connection to the database if not already connected.

void P::SQLConnection::rollback  )  throw (SQLError)
 

Rollback transaction.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:36 2004 for P::Classes by doxygen 1.3.3