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

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, 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 
00050 class PQXX_LIBEXPORT RobustTransaction : public TransactionItf
00051 {
00052 public:
00053   explicit RobustTransaction(Connection &, 
00054                              PGSTD::string Name=PGSTD::string());       //[t16]
00055 
00056   virtual ~RobustTransaction();                                         //[t16]
00057 
00058 private:
00059   typedef unsigned long IDType;
00060   IDType m_ID;
00061   PGSTD::string m_LogTable;
00062 
00063   virtual void DoBegin();                                               //[t18]
00064   virtual Result DoExec(const char[]);                                  //[t18]
00065   virtual void DoCommit();                                              //[t16]
00066   virtual void DoAbort();                                               //[t18]
00067 
00068   void CreateLogTable();
00069   void CreateTransactionRecord();
00070   void DeleteTransactionRecord(IDType ID) throw ();
00071   bool CheckTransactionRecord(IDType ID);
00072 };
00073 
00074 
00075 }
00076 
00077 
00078 #endif
00079 

Generated on Mon Sep 23 01:20:26 2002 for libpqxx by doxygen1.2.16