libpqxx
isolation.hxx
1 
13 #ifndef PQXX_H_ISOLATION
14 #define PQXX_H_ISOLATION
15 
16 #include "pqxx/compiler-public.hxx"
17 #include "pqxx/compiler-internal-pre.hxx"
18 
19 #include "pqxx/util.hxx"
20 
21 namespace pqxx
22 {
23 
25 
57 {
58  // read_uncommitted,
62 };
63 
65 template<isolation_level LEVEL> struct isolation_traits
66 {
67  static constexpr isolation_level level() noexcept { return LEVEL; }
68  static constexpr const char *name() noexcept;
69 };
70 
71 
72 template<>
73 inline constexpr const char *isolation_traits<read_committed>::name() noexcept
74  { return "READ COMMITTED"; }
75 
76 template<>
77 inline constexpr const char *isolation_traits<repeatable_read>::name() noexcept
78  { return "REPEATABLE READ"; }
79 
80 template<>
81 inline constexpr const char *isolation_traits<serializable>::name() noexcept
82  { return "SERIALIZABLE"; }
83 
84 }
85 
86 #include "pqxx/compiler-internal-post.hxx"
87 
88 #endif
Definition: isolation.hxx:59
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:22
isolation_level
Transaction isolation levels.
Definition: isolation.hxx:56
Traits class to describe an isolation level; primarly for libpqxx&#39;s own use.
Definition: isolation.hxx:65
static constexpr const char * name() noexcept
Definition: isolation.hxx:61
Definition: isolation.hxx:60
static constexpr isolation_level level() noexcept
Definition: isolation.hxx:67