Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

pqxx::NonTransaction Class Reference

Simple "Transaction" class offering no transactional integrity. More...

#include <nontransaction.h>

Inheritance diagram for pqxx::NonTransaction:

pqxx::transaction_base List of all members.

Public Member Functions

 NonTransaction (connection_base &C, const PGSTD::string &NName=PGSTD::string())
 Constructor.

virtual ~NonTransaction ()

Detailed Description

Simple "Transaction" class offering no transactional integrity.

NonTransaction, like Transaction or any other transaction_base-derived class, provides access to a database through a connection. Unlike its siblings, however, NonTransaction does not maintain any kind of transactional integrity. This may be useful eg. for read-only access to the database that does not require a consistent, atomic view on its data; or for operations that are not allowed within a backend transaction, such as creating tables. As a side effect, you can keep a NonTransaction open for as long as you like. Actual back-end transactions are limited in lifespan, and will sometimes fail just because they took too long to execute. This will not happen with a NonTransaction. It may need to restore its connection, but it won't abort as a result.

Any query executed in a NonTransaction is committed immediately, and neither Commit() nor Abort() has any effect.

Database features that require a backend transaction, such as cursors or large objects, will not work in a NonTransaction.


Constructor & Destructor Documentation

pqxx::NonTransaction::NonTransaction connection_base   C,
const PGSTD::string &    NName = PGSTD::string()
[explicit]
 

Constructor.

Create a "dummy" transaction.

Parameters:
C the connection that this "transaction" will operate on.
NName an optional name for the transaction, beginning with a letter and containing only letters and digits.

pqxx::NonTransaction::~NonTransaction   [virtual]
 


The documentation for this class was generated from the following files:
Generated on Mon May 26 05:06:54 2003 for libpqxx by doxygen1.3-rc3