00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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
00023
00024
00025
00026 namespace pqxx
00027 {
00028
00030
00050 class PQXX_LIBEXPORT RobustTransaction : public TransactionItf
00051 {
00052 public:
00053 explicit RobustTransaction(Connection &,
00054 PGSTD::string Name=PGSTD::string());
00055
00056 virtual ~RobustTransaction();
00057
00058 private:
00059 typedef unsigned long IDType;
00060 IDType m_ID;
00061 PGSTD::string m_LogTable;
00062
00063 virtual void DoBegin();
00064 virtual Result DoExec(const char[]);
00065 virtual void DoCommit();
00066 virtual void DoAbort();
00067
00068 void CreateLogTable();
00069 void CreateTransactionRecord();
00070 void DeleteTransactionRecord(IDType ID) throw ();
00071 bool CheckTransactionRecord(IDType ID);
00072
00073 static PGSTD::string s_SeqPostfix;
00074 static PGSTD::string s_IdxPostfix;
00075 };
00076
00077
00078 }
00079
00080
00081 #endif
00082