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:
00100   explicit RobustTransaction(Connection &, 
00101                              const PGSTD::string &Name=PGSTD::string());//[t16]
00102 
00103   virtual ~RobustTransaction();                                         //[t16]
00104 
00105 private:
00106   typedef unsigned long IDType;
00107   IDType m_ID;
00108   PGSTD::string m_LogTable;
00109 
00110   virtual void DoBegin();                                               //[t18]
00111   virtual Result DoExec(const char[]);                                  //[t18]
00112   virtual void DoCommit();                                              //[t16]
00113   virtual void DoAbort();                                               //[t18]
00114 
00115   void CreateLogTable();
00116   void CreateTransactionRecord();
00117   void DeleteTransactionRecord(IDType ID) throw ();
00118   bool CheckTransactionRecord(IDType ID);
00119 };
00120 
00121 
00122 }
00123 
00124 
00125 #endif
00126 

Generated on Tue Feb 11 12:56:39 2003 for libpqxx by doxygen1.3-rc2