# nontransaction.hxx

Go to the documentation of this file.

    00001 /*-------------------------------------------------------------------------
    00002  *
    00003  *   FILE
    00004  *      pqxx/nontransaction.hxx
    00005  *
    00006  *   DESCRIPTION
    00007  *      definition of the pqxx::nontransaction class.
    00008  *   pqxx::nontransaction provides nontransactional database access
    00009  *   DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/nontransaction instead.
    00010  *
    00011  * Copyright (c) 2002-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/connection_base"
    00023 #include "pqxx/result"
    00024 #include "pqxx/transaction_base"
    00025
    00026 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
    00027  */
    00028
    00029
    00030 namespace pqxx
    00031 {
    00032
    00034
    00059 class PQXX_LIBEXPORT nontransaction : public transaction_base
    00060 {
    00061 public:
    00063
    00068   explicit nontransaction(connection_base &C,
    00069                           const PGSTD::string &Name=PGSTD::string()) :  //[t14]
    00070     namedclass("nontransaction", Name), transaction_base(C) { Begin(); }
    00071
    00072   virtual ~nontransaction();                                            //[t14]
    00073
    00074 private:
    00075   virtual void do_begin() {}                                            //[t14]
    00076   virtual result do_exec(const char C[]);                               //[t14]
    00077   virtual void do_commit() {}                                           //[t14]
    00078   virtual void do_abort() {}                                            //[t14]
    00079 };
    00080
    00081
    00082 } // namespace pqxx
    00083
    00084
    00085 #include "pqxx/compiler-internal-post.hxx"