dbtransaction.hxx
/*-------------------------------------------------------------------------
*
* FILE
* pqxx/dbtransaction.hxx
*
* DESCRIPTION
* definition of the pqxx::dbtransaction abstract base class.
* pqxx::dbransaction defines a real transaction on the database
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
*
* Copyright (c) 2004-2009, Jeroen T. Vermeulen <jtv@xs4all.nl>
*
* See COPYING for copyright license. If you did not receive a file called
* COPYING with this source code, please notify the distributor of this mistake,
* or contact the author.
*
*-------------------------------------------------------------------------
*/
#ifndef PQXX_H_DBTRANSACTION
#define PQXX_H_DBTRANSACTION
#include "pqxx/compiler-public.hxx"
#include "pqxx/compiler-internal-pre.hxx"
#include "pqxx/transaction_base"
namespace pqxx
{
enum readwrite_policy
{
read_only,
read_write
};
class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
{
public:
virtual ~dbtransaction();
protected:
dbtransaction(
connection_base &,
const PGSTD::string &IsolationString,
readwrite_policy rw=read_write);
explicit dbtransaction(
connection_base &,
bool direct=true,
readwrite_policy rw=read_write);
void start_backend_transaction();
virtual void do_begin(); //[t1]
virtual result do_exec(const char Query[]);
virtual void do_commit() =0;
virtual void do_abort(); //[t13]
static PGSTD::string fullname(const PGSTD::string &ttype,
const PGSTD::string &isolation);
private:
PGSTD::string m_StartCmd;
};
} // namespace pqxx
#include "pqxx/compiler-internal-post.hxx"
#endif
pqxx::result
Result set containing data returned by a query or command.
Definition: result.hxx:81
pqxx::connection_base
connection_base abstract base class; represents a connection to a database.
Definition: connection_base.hxx:151
pqxx::dbtransaction
Definition: dbtransaction.hxx:73
pqxx::read_only
Definition: dbtransaction.hxx:32
pqxx::readwrite_policy
readwrite_policy
Definition: dbtransaction.hxx:30
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition: basic_connection.hxx:35
pqxx::transaction_base
Definition: transaction_base.hxx:133
pqxx::read_write
Definition: dbtransaction.hxx:33