Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

isolation.h

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

Generated on Sat Jun 7 00:49:33 2003 for libpqxx by doxygen1.3-rc3