nontransaction.hxx
#ifndef PQXX_H_NONTRANSACTION
#define PQXX_H_NONTRANSACTION
#include "pqxx/compiler-public.hxx"
#include "pqxx/compiler-internal-pre.hxx"
#include "pqxx/connection_base.hxx"
#include "pqxx/result.hxx"
#include "pqxx/transaction_base.hxx"
// Methods tested in eg. test module test01 are marked with "//[t01]".
namespace pqxx
{
class PQXX_LIBEXPORT nontransaction : public transaction_base
{
public:
explicit nontransaction( //[t14]
connection_base &C,
const std::string &Name=std::string{}) :
namedclass{"nontransaction", Name}, transaction_base{C} { Begin(); }
virtual ~nontransaction(); //[t14]
private:
virtual void do_begin() override {} //[t14]
virtual result do_exec(const char C[]) override; //[t14]
virtual void do_commit() override {} //[t14]
virtual void do_abort() override {} //[t14]
};
} // namespace pqxx
#include "pqxx/compiler-internal-post.hxx"
#endif
pqxx::nontransaction::~nontransaction
virtual ~nontransaction()
Definition: nontransaction.cxx:16
pqxx::result
Result set containing data returned by a query or command.
Definition: result.hxx:69
pqxx::transaction_base::End
void End() noexcept
End transaction. To be called by implementing class' destructor.
Definition: transaction_base.cxx:408
pqxx::nontransaction::nontransaction
nontransaction(connection_base &C, const std::string &Name=std::string{})
Constructor.
Definition: nontransaction.hxx:63
pqxx::connection_base
connection_base abstract base class; represents a connection to a database.
Definition: connection_base.hxx:139
pqxx::transaction_base
Interface definition (and common code) for "transaction" classes.
Definition: transaction_base.hxx:136
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25
pqxx::nontransaction
Simple "transaction" class offering no transactional integrity.
Definition: nontransaction.hxx:54