isolation.hxx
/*-------------------------------------------------------------------------
*
* 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-2013, 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
{
enum isolation_level
{
// read_uncommitted,
read_committed,
repeatable_read,
serializable
};
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<repeatable_read>::name() throw ()
{ return "REPEATABLE READ"; }
template<> inline const char *isolation_traits<serializable>::name() throw ()
{ return "SERIALIZABLE"; }
}
#include "pqxx/compiler-internal-post.hxx"
#endif
pqxx::isolation_traits
Traits class to describe an isolation level; primarly for libpqxx&#39;s own use.
Definition: isolation.hxx:69
pqxx::serializable
Definition: isolation.hxx:65
pqxx::isolation_traits::level
static isolation_level level()
Definition: isolation.hxx:71
pqxx::isolation_traits::name
static const char * name()
pqxx::read_committed
Definition: isolation.hxx:63
pqxx::repeatable_read
Definition: isolation.hxx:64
pqxx::isolation_level
isolation_level
Transaction isolation levels.
Definition: isolation.hxx:60
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition: basic_connection.hxx:35