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

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, 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/util"
00020 
00021 namespace pqxx
00022 {
00023 
00025 
00033 enum PQXX_LIBEXPORT isolation_level 
00034 { 
00035   // read_uncommitted, 
00036   read_committed,
00037   // repeatable_read,
00038   serializable
00039 };
00040 
00042 template<isolation_level LEVEL> struct isolation_traits
00043 {
00044   static isolation_level level() throw () { return LEVEL; }
00045   static const char *name() throw ();
00046 
00048   static void implemented() throw ();
00049 };
00050 
00051 template<> inline void isolation_traits<read_committed>::implemented() throw(){}
00052 template<> inline void isolation_traits<serializable>::implemented() throw(){}
00053 
00054 template<> inline const char *isolation_traits<read_committed>::name() throw ()
00055         { return "READ COMMITTED"; }
00056 template<> inline const char *isolation_traits<serializable>::name() throw ()
00057         { return "SERIALIZABLE"; }
00058 
00059 }
00060 
00061 

Generated on Fri Nov 21 19:50:08 2003 for libpqxx by doxygen 1.3.4