July 2005
Intermediate to advanced
1032 pages
27h 10m
English
libpqxx strives to provide a robust connection to a PostgreSQL server, and the transactor<> class reflects that effort. The transactor<> class defines four important member functions:
void operator()( TRANSACTION & trans ); void OnAbort( const char errorMessage[] ) throw(); void OnCommit( void ) throw(); void OnDoubt( void ) throw();
When you derive a class from transactor<>, you must provide your own implementation for the operator() member function: That's where all the real work is done. To execute a transaction, you create an object derived from transactor<> and then pass that object to the connection_base::perform() member function. connection_base::perform() calls the operator() function in your transactor<> ...
Read now
Unlock full access