00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00039 read_committed,
00040
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