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

pqxx::TransactionItf Class Reference

Interface definition (and common code) for "transaction" classes. More...

#include <transactionitf.h>

Inheritance diagram for pqxx::TransactionItf:

pqxx::NonTransaction pqxx::RobustTransaction pqxx::Transaction List of all members.

Public Member Functions

virtual ~TransactionItf ()=0
void Commit ()
void Abort ()
Result Exec (const char Query[], const PGSTD::string &Desc=PGSTD::string())
 Execute query.

Result Exec (const PGSTD::string &Query, const PGSTD::string &Desc=PGSTD::string())
 Execute query.

void ProcessNotice (const char Msg[])
 Have connection process warning message.

void ProcessNotice (const PGSTD::string &Msg)
 Have connection process warning message.

PGSTD::string Name () const
ConnectionItfConn () const
 Connection this transaction is running in.


Protected Member Functions

 TransactionItf (ConnectionItf &, const PGSTD::string &TName=PGSTD::string())
void Begin ()
void End () throw ()
 End transaction. To be called by implementing class' destructor.

virtual void DoBegin ()=0
 To be implemented by derived implementation class.

virtual Result DoExec (const char Query[])=0
virtual void DoCommit ()=0
virtual void DoAbort ()=0
Result DirectExec (const char C[], int Retries, const char OnReconnect[])
 Execute query on connection directly.


Friends

class Cursor
class TableStream
class TableReader
class TableWriter

Detailed Description

Interface definition (and common code) for "transaction" classes.

All database access must be channeled through one of these classes for safety, although not all implementations of this interface need to provide full transactional integrity.


Constructor & Destructor Documentation

pqxx::TransactionItf::~TransactionItf   [pure virtual]
 

pqxx::TransactionItf::TransactionItf ConnectionItf  ,
const PGSTD::string &    TName = PGSTD::string()
[explicit, protected]
 

Create a transaction. The optional name, if given, must begin with a letter and may contain letters and digits only.


Member Function Documentation

void pqxx::TransactionItf::Abort  
 

void pqxx::TransactionItf::Begin   [protected]
 

Begin transaction. To be called by implementing class, typically from constructor.

void pqxx::TransactionItf::Commit  
 

ConnectionItf& pqxx::TransactionItf::Conn   const
 

Connection this transaction is running in.

pqxx::Result pqxx::TransactionItf::DirectExec const char    C[],
int    Retries,
const char    OnReconnect[]
[protected]
 

Execute query on connection directly.

virtual void pqxx::TransactionItf::DoAbort   [protected, pure virtual]
 

virtual void pqxx::TransactionItf::DoBegin   [protected, pure virtual]
 

To be implemented by derived implementation class.

virtual void pqxx::TransactionItf::DoCommit   [protected, pure virtual]
 

virtual Result pqxx::TransactionItf::DoExec const char    Query[] [protected, pure virtual]
 

void pqxx::TransactionItf::End   throw () [protected]
 

End transaction. To be called by implementing class' destructor.

Result pqxx::TransactionItf::Exec const PGSTD::string &    Query,
const PGSTD::string &    Desc = PGSTD::string()
 

Execute query.

Perform a query in this transaction. This version may be slightly slower than the version taking a const char[], although the difference is not likely to be very noticeable compared to the time required to execute even a simple query.

Parameters:
Query the query or command to execute
Desc optional identifier for query, to help pinpoint SQL errors

pqxx::Result pqxx::TransactionItf::Exec const char    Query[],
const PGSTD::string &    Desc = PGSTD::string()
 

Execute query.

Perform a query in this transaction.

Parameters:
Query the query or command to execute
Desc optional identifier for query, to help pinpoint SQL errors

PGSTD::string pqxx::TransactionItf::Name   const
 

void pqxx::TransactionItf::ProcessNotice const PGSTD::string &    Msg
 

Have connection process warning message.

void pqxx::TransactionItf::ProcessNotice const char    Msg[]
 

Have connection process warning message.


Friends And Related Function Documentation

friend class Cursor [friend]
 

friend class TableReader [friend]
 

friend class TableStream [friend]
 

friend class TableWriter [friend]
 


The documentation for this class was generated from the following files:
Generated on Thu Mar 27 19:34:41 2003 for libpqxx by doxygen1.3-rc3