isolation.hxx
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PQXX_H_ISOLATION
00020 #define PQXX_H_ISOLATION
00021
00022 #include "pqxx/compiler-public.hxx"
00023 #include "pqxx/compiler-internal-pre.hxx"
00024
00025 #include "pqxx/util"
00026
00027 namespace pqxx
00028 {
00029
00031
00039 enum isolation_level
00040 {
00041
00042 read_committed,
00043
00044 serializable
00045 };
00046
00048 template<isolation_level LEVEL> struct isolation_traits
00049 {
00050 static isolation_level level() throw () { return LEVEL; }
00051 static const char *name() throw ();
00052 };
00053
00054
00055 template<> inline const char *isolation_traits<read_committed>::name() throw ()
00056 { return "READ COMMITTED"; }
00057 template<> inline const char *isolation_traits<serializable>::name() throw ()
00058 { return "SERIALIZABLE"; }
00059
00060 }
00061
00062
00063 #include "pqxx/compiler-internal-post.hxx"
00064
00065 #endif
00066