/usr/include/pqxx/isolation.hxx is in libpqxx3-dev 3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /*-------------------------------------------------------------------------
*
* FILE
* pqxx/isolation.hxx
*
* DESCRIPTION
* definitions of transaction isolation levels
* Policies and traits describing SQL transaction isolation levels
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/isolation instead.
*
* Copyright (c) 2003-2008, 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_ISOLATION
#define PQXX_H_ISOLATION
#include "pqxx/compiler-public.hxx"
#include "pqxx/compiler-internal-pre.hxx"
#include "pqxx/util"
namespace pqxx
{
/// Transaction isolation levels; PostgreSQL doesn't implement all SQL levels
/** The only levels implemented in postgres are read_committed and serializable;
* SQL also defines read_uncommitted and repeatable_read. Unless you're bent on
* using nasty tricks to communicate between ongoing transactions and such, you
* won't really need isolation levels for anything except performance
* optimization. In that case, you can safely emulate read_uncommitted by using
* read_committed and repeatable_read by using serializable. In general,
* serializable is the safest choice.
*/
enum isolation_level
{
// read_uncommitted,
read_committed,
// repeatable_read,
serializable
};
/// Traits class to describe an isolation level; primarly for libpqxx's own use
template<isolation_level LEVEL> struct isolation_traits
{
static isolation_level level() throw () { return LEVEL; }
static const char *name() throw ();
};
template<> inline const char *isolation_traits<read_committed>::name() throw ()
{ return "READ COMMITTED"; }
template<> inline const char *isolation_traits<serializable>::name() throw ()
{ return "SERIALIZABLE"; }
}
#include "pqxx/compiler-internal-post.hxx"
#endif
|