transaction.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 /***********************************************************************
00009  Copyright (c) 2006 by Educational Technology Resources, Inc.  Others
00010  may also hold copyrights on code in this file.  See the CREDITS file
00011  in the top directory of the distribution for details.
00012 
00013  This file is part of MySQL++.
00014 
00015  MySQL++ is free software; you can redistribute it and/or modify it
00016  under the terms of the GNU Lesser General Public License as published
00017  by the Free Software Foundation; either version 2.1 of the License, or
00018  (at your option) any later version.
00019 
00020  MySQL++ is distributed in the hope that it will be useful, but WITHOUT
00021  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00022  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00023  License for more details.
00024 
00025  You should have received a copy of the GNU Lesser General Public
00026  License along with MySQL++; if not, write to the Free Software
00027  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
00028  USA
00029 ***********************************************************************/
00030 
00031 #if !defined(MYSQLPP_TRANSACTION_H)
00032 #define MYSQLPP_TRANSACTION_H
00033 
00034 #include "common.h"
00035 
00036 namespace mysqlpp {
00037 
00038 #if !defined(DOXYGEN_IGNORE)
00039 // Make Doxygen ignore this
00040 class MYSQLPP_EXPORT Connection;
00041 #endif
00042 
00044 
00045 class MYSQLPP_EXPORT Transaction
00046 {
00047 public:
00054         Transaction(Connection& conn, bool consistent = false);
00055 
00064         ~Transaction();
00065 
00073         void commit();
00074 
00081         void rollback();
00082 
00083 private:
00084         Connection& conn_;      
00085         bool finished_;         
00086 };
00087 
00088 } // end namespace mysqlpp
00089 
00090 #endif // !defined(MYSQLPP_TRANSACTION_H)
00091 

Generated on Fri Feb 29 16:26:00 2008 for MySQL++ by  doxygen 1.4.7