dbtransaction.hxx

00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/dbtransaction.hxx
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::dbtransaction abstract base class.
00008  *   pqxx::dbransaction defines a real transaction on the database
00009  *   DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
00010  *
00011  * Copyright (c) 2004-2008, Jeroen T. Vermeulen <jtv@xs4all.nl>
00012  *
00013  * See COPYING for copyright license.  If you did not receive a file called
00014  * COPYING with this source code, please notify the distributor of this mistake,
00015  * or contact the author.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #ifndef PQXX_H_DBTRANSACTION
00020 #define PQXX_H_DBTRANSACTION
00021 
00022 #include "pqxx/compiler-public.hxx"
00023 #include "pqxx/compiler-internal-pre.hxx"
00024 
00025 #include "pqxx/transaction_base"
00026 
00027 namespace pqxx
00028 {
00029 
00031 
00061 class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
00062 {
00063 protected:
00064   dbtransaction(connection_base &, const PGSTD::string &IsolationString);
00065   explicit dbtransaction(connection_base &, bool direct=true);
00066 
00067   virtual ~dbtransaction();
00068 
00070   void start_backend_transaction();
00071 
00072 protected:
00074   virtual void do_begin();                                              //[t1]
00076   virtual result do_exec(const char Query[]);
00078   virtual void do_commit() =0;
00080 
00086   virtual void do_abort();                                              //[t13]
00087 
00088   static PGSTD::string fullname(const PGSTD::string &ttype,
00089         const PGSTD::string &isolation);
00090 
00091 private:
00093   PGSTD::string m_StartCmd;
00094 };
00095 
00096 
00097 } // namespace pqxx
00098 
00099 #include "pqxx/compiler-internal-post.hxx"
00100 
00101 #endif
00102 

Generated on Sat Aug 15 00:16:49 2009 for libpqxx by  doxygen 1.5.8