isolation.hxx

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/isolation.hxx
00005  *
00006  *   DESCRIPTION
00007  *      definitions of transaction isolation levels
00008  *   Policies and traits describing SQL transaction isolation levels
00009  *   DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/isolation instead.
00010  *
00011  * Copyright (c) 2003-2006, Jeroen T. Vermeulen <jtv@xs4all.nl>
00012  *
00013  * See COPYING for copyright license.  If you did not receive a file called
00014  * COPYING with this source code, please notify the distributor of this mistake,
00015  * or contact the author.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #include "pqxx/compiler-public.hxx"
00020 #include "pqxx/compiler-internal-pre.hxx"
00021 
00022 #include "pqxx/util"
00023 
00024 namespace pqxx
00025 {
00026 
00028 
00036 enum isolation_level
00037 {
00038   // read_uncommitted,
00039   read_committed,
00040   // repeatable_read,
00041   serializable
00042 };
00043 
00045 template<isolation_level LEVEL> struct isolation_traits
00046 {
00047   static isolation_level level() throw () { return LEVEL; }
00048   static const char *name() throw ();
00049 };
00050 
00051 
00052 template<> inline const char *isolation_traits<read_committed>::name() throw ()
00053         { return "READ COMMITTED"; }
00054 template<> inline const char *isolation_traits<serializable>::name() throw ()
00055         { return "SERIALIZABLE"; }
00056 
00057 }
00058 
00059 
00060 #include "pqxx/compiler-internal-post.hxx"

Generated on Thu Feb 1 17:12:08 2007 for libpqxx by  doxygen 1.5.1