template<isolation_level ISOLATION = isolation_level::read_committed, write_policy READWRITE = write_policy::read_write>
class pqxx::pqxx::transaction< ISOLATION, READWRITE >
Standard back-end transaction, templatized on isolation level.
This is the type you'll normally want to use to represent a transaction on the database.
Usage example: double all wages.
extern connection C;
try
{
T.exec("UPDATE employees SET wage=wage*2");
T.commit();
}
catch (exception const &e)
{
cerr << e.what() << endl;
T.abort();
}