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-2005, 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/libcompiler.h"
00020 
00021 #include "pqxx/util"
00022 
00023 namespace pqxx
00024 {
00025 
00027 
00035 enum PQXX_LIBEXPORT isolation_level
00036 {
00037   // read_uncommitted,
00038   read_committed,
00039   // repeatable_read,
00040   serializable
00041 };
00042 
00044 template<isolation_level LEVEL> struct isolation_traits
00045 {
00046   static isolation_level level() throw () { return LEVEL; }
00047   static const char *name() throw ();
00048 };
00049 
00050 
00051 template<> inline const char *isolation_traits<read_committed>::name() throw ()
00052         { return "READ COMMITTED"; }
00053 template<> inline const char *isolation_traits<serializable>::name() throw ()
00054         { return "SERIALIZABLE"; }
00055 
00056 }
00057 
00058 

Generated on Sat Mar 19 18:42:42 2005 for libpqxx by  doxygen 1.4.1