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

robusttransaction.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/robusttransaction.h
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::RobustTransaction class.
00008  *   pqxx::RobustTransaction is a slower but safer transaction class
00009  *
00010  * Copyright (c) 2002-2003, Jeroen T. Vermeulen <jtv@xs4all.nl>
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef PQXX_ROBUSTTRANSACTION_H
00015 #define PQXX_ROBUSTTRANSACTION_H
00016 
00017 
00018 #include "pqxx/connection.h"
00019 #include "pqxx/transactionitf.h"
00020 
00021 
00022 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
00023  */
00024 
00025 
00026 namespace pqxx
00027 {
00028 
00030 
00097 class PQXX_LIBEXPORT RobustTransaction : public TransactionItf
00098 {
00099 public:
00101 
00105   explicit RobustTransaction(Connection &C,
00106                              const PGSTD::string &Name=PGSTD::string());//[t16]
00107 
00108   virtual ~RobustTransaction();                                         //[t16]
00109 
00110 private:
00111   typedef unsigned long IDType;
00112   IDType m_ID;
00113   PGSTD::string m_LogTable;
00114 
00115   virtual void DoBegin();                                               //[t18]
00116   virtual Result DoExec(const char[]);                                  //[t18]
00117   virtual void DoCommit();                                              //[t16]
00118   virtual void DoAbort();                                               //[t18]
00119 
00120   void CreateLogTable();
00121   void CreateTransactionRecord();
00122   void DeleteTransactionRecord(IDType ID) throw ();
00123   bool CheckTransactionRecord(IDType ID);
00124 };
00125 
00126 
00127 }
00128 
00129 
00130 #endif
00131 

Generated on Fri Feb 28 19:23:32 2003 for libpqxx by doxygen1.3-rc3