Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

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 "platform.h"
00035 
00036 namespace mysqlpp {
00037 
00038 class Connection;
00039 
00041 
00042 class Transaction
00043 {
00044 public:
00051         MYSQLPP_EXPORT Transaction(Connection& conn, bool consistent = false);
00052 
00061         MYSQLPP_EXPORT ~Transaction();
00062 
00070         MYSQLPP_EXPORT void commit();
00071 
00078         MYSQLPP_EXPORT void rollback();
00079 
00080 private:
00081         Connection& conn_;      
00082         bool finished_;         
00083 };
00084 
00085 } // end namespace mysqlpp
00086 
00087 #endif // !defined(MYSQLPP_TRANSACTION_H)
00088 

Generated on Fri Mar 24 14:04:25 2006 for MySQL++ by doxygen1.2.18