00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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();
00076 virtual result do_exec(const char Query[]);
00078 virtual void do_commit() =0;
00080
00086 virtual void do_abort();
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 }
00098
00099 #include "pqxx/compiler-internal-post.hxx"
00100
00101 #endif
00102