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

nontransaction.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/nontransaction.h
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::nontransaction class.
00008  *   pqxx::nontransaction provides nontransactional database access
00009  *
00010  * Copyright (c) 2002-2003, Jeroen T. Vermeulen <jtv@xs4all.nl>
00011  *
00012  * See COPYING for copyright license.  If you did not receive a file called
00013  * COPYING with this source code, please notify the distributor of this mistake,
00014  * or contact the author.
00015  *
00016  *-------------------------------------------------------------------------
00017  */
00018 #ifndef PQXX_NONTRANSACTION_H
00019 #define PQXX_NONTRANSACTION_H
00020 
00021 #include "pqxx/connection_base.h"
00022 #include "pqxx/result.h"
00023 #include "pqxx/transaction_base.h"
00024 
00025 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
00026  */
00027 
00028 
00029 namespace pqxx
00030 {
00031 class nontransaction;
00032 
00034 template<> inline PGSTD::string Classname(const nontransaction *) 
00035 { 
00036   return "nontransaction"; 
00037 }
00038 
00039 
00040 
00042 
00063 class PQXX_LIBEXPORT nontransaction : public transaction_base
00064 {
00065 public:
00067 
00072   explicit nontransaction(connection_base &C, 
00073                           const PGSTD::string &NName=PGSTD::string()) : //[t14]
00074     transaction_base(C, NName) { Begin(); }
00075 
00076   virtual ~nontransaction();                                            //[t14]
00077 
00078 private:
00079   virtual void DoBegin() {}                                             //[t14]
00080   virtual result DoExec(const char C[]);                                //[t14]
00081   virtual void DoCommit() {}                                            //[t14]
00082   virtual void DoAbort() {}                                             //[t14]
00083 };
00084 
00086 typedef nontransaction NonTransaction;
00087 
00088 }
00089 
00090 #endif
00091 

Generated on Sat Jun 7 00:49:34 2003 for libpqxx by doxygen1.3-rc3