# dbtransaction.hxx

Go to the documentation of this file.

    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-2006, 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 #include "pqxx/compiler-public.hxx"
    00020 #include "pqxx/compiler-internal-pre.hxx"
    00021
    00022 #include "pqxx/transaction_base"
    00023
    00024 namespace pqxx
    00025 {
    00026
    00028
    00058 class PQXX_LIBEXPORT dbtransaction : public transaction_base
    00059 {
    00060 protected:
    00061   dbtransaction(connection_base &, const PGSTD::string &IsolationString);
    00062   explicit dbtransaction(connection_base &, bool direct=true);
    00063
    00064   virtual ~dbtransaction();
    00065
    00067   void start_backend_transaction();
    00068
    00069 protected:
    00071   virtual void do_begin();                                              //[t1]
    00073   virtual result do_exec(const char Query[]);
    00075   virtual void do_commit() =0;
    00077
    00083   virtual void do_abort();                                              //[t13]
    00084
    00085   static PGSTD::string fullname(const PGSTD::string &ttype,
    00086         const PGSTD::string &isolation);
    00087
    00088 private:
    00090   PGSTD::string m_StartCmd;
    00091 };
    00092
    00093
    00094 } // namespace pqxx
    00095
    00096 #include "pqxx/compiler-internal-post.hxx"