Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | 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-2004, 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 };
00047 
00048 
00049 template<> inline const char *isolation_traits<read_committed>::name() throw ()
00050         { return "READ COMMITTED"; }
00051 template<> inline const char *isolation_traits<serializable>::name() throw ()
00052         { return "SERIALIZABLE"; }
00053 
00054 }
00055 
00056 

Generated on Mon Nov 15 11:27:59 2004 for libpqxx by  doxygen 1.3.9.1